RE: [coldbox:25796] Coldbox 3.8.1 Help with renderView

When you call renderview(), you are just directly rendering the view. You are not executing an event, so the projects.edit handler action is not invoked.

What you want to do is put #runEvent( “projects.edit” )# instead and then RETURN the renderView() call from inside the handler. This will make the entire action’s handler processing and view rendering reusable. I would also look into passing view args directly to your view so you don’t pollute the rc or prc scope.

See this repo for an example of viewlets in action:
https://github.com/bdw429s/ColdBox-Viewlet-Sample

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thank you for that Brad, just what I was after.

Maybe you should check with Luis and see if there is enough interest to put on some training session in Sydney Australia.

If you find a company willing to fly us down and have us train their team, we’ll be there :slight_smile: The chances of us putting on a general training is probably slim since there are no CF conferences and not a ton of developers. We go where the demand is though, so ping us directly if you know of a hotspot of devs willing to attend a training camp.

Something for you to keep your eye out for is Ortus University. It will be live, online instructor-led training done by Luis, myself, and the team. It’s for people in far away places or with a smaller training budget who can’t afford onsites. We’ll be kicking this off soon.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com