Luis Majano Forums Notification: Post to Separating model and view

Title: RE: Separating model and view
Thread: Separating model and view
Forum: Need Help?
Conference: ColdBox
User: lmajano

Hi,
Your business objects in my sense can be accessed from the views. You can
do this easily by just putting them in the request collection and picking them
up in the view. So if I have the following in my handler:

[code]
<cfset var
rc = event.getCollection()>
<cfset rc.oOrder = model.getOrder()>
[/code]
Then in your view:

[code]
<cfoutput>

Order Number:
#rc.oOrder.getOrderNumber()#
Order Items: #rc.oOrder.getItems()#

</cfoutput>
[/code]

and so forth and forth.

http://www.luismajano.com/forums/index.cfm?event=ehMessages.dspMessages&threadid=68BD76AE-123F-6116-42E944468786E4DF