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

24 views
Skip to first unread message

br...@bradwood.com

unread,
Jul 11, 2016, 2:55:43 PM7/11/16
to col...@googlegroups.com
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:

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
Subject: [coldbox:25796] Coldbox 3.8.1 Help with renderView
From: ken.ca...@sswahs.nsw.gov.au
Date: 7/11/16 1:24 am
To: "ColdBox Platform" <col...@googlegroups.com>

Hi All,
I need some help with renderView
 
I have a standard Advanced Script site. So main.cfc does setView(main/index)
 
Now in index.cfm I have a tab, In each tab pain I have #renderView('projects/edit')#
 
This loads and displays the view as expected.
 
But in the edit function in the projects handler I am returning data in the rc scope.
 
But none of this data is accessible in the edit.cfm page.
 
Am I doing this wrong or missing something?
 
Regards
Ken

 

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/2e0232f8-cf34-4056-a236-260d5a857693%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ken.ca...@sswahs.nsw.gov.au

unread,
Jul 14, 2016, 11:44:27 PM7/14/16
to ColdBox Platform
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.

br...@bradwood.com

unread,
Jul 15, 2016, 12:42:25 AM7/15/16
to col...@googlegroups.com
If you find a company willing to fly us down and have us train their team, we'll be there :)  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.
--------- Original Message ---------
Reply all
Reply to author
Forward
0 new messages