: This kind of logic belongs in your listeners and business logic/model
: objects--by the time you get to your view you should have a complete
: construct of what you're going to want to display. So on the view all
: you're doing is outputting--you're not calling other objects at that point.
:
: Simple example--a listener called "myListener" that has a method called
: "getData" that returns a query. In your event handler you'd have:
: <event-handler event="myEvent" access="public">
: <notify listener="myListener" method="getData" resultArg="myData" />
: <view-page name="showData" />
: </event-handler>
:
: This puts the query object returned by the listener into your event
: object as an argument called "myData."
:
: Then in your view you simply loop over the query:
: <cfset myData = event.getArg("myData") />
:
: <cfoutput query="myData">
: #myData.foo#
: </cfoutput>
Okay...made some changes to match this idea. Now the gateway function that does
the
initial query takes that query and uses it to make a new query that adds in the
thumbnail
and PDF details I need for that page. Then my view is purely output. Is that
what you
meant? If a page needs data from multiple sources, the gateway should do that,
either
returning a combined query or something and array or structure, as is
appropriate?
Summer S. Wilson
Collectonian on Yahoo! Messenger
An Eclectic World (http://eclectic-world.com)
LiveJournal (http://collectonian.livejournal.com)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets:
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
-~----------~----~----~----~------~----~------~--~---