Summer S. Wilson wrote:
Okay...but how do you do that when you are looping through the output to get the first bit and then need to get other bits based on the first bit? Normally, I'd do an invoke, but I don't think that would be right either?

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>

--
Matthew Woodward
[email protected]
http://www.mattwoodward.com/blog

Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to