Re: Multiple Actions

rgants <[email protected]> Fri, 29 Dec 2006 16:19:33 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <1955203.1167431164935.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
I figured out the answer to my own question; so for those that may be having the same issue here is how to solve it. In your jsp call the actions you need with the <ww:action tag>. The part of this that is critical is giving the action an id and leaving the default on executeResult (which is false). 

So, for example:

<ww:action name="listPersons" id="testPersons"/>
<ww:action name="listEvents" id="testEvents"/>

Allows me to invoke the actions listPersons and listEvents with out having them return to their jsp pages (because default executeResult) and making the testPersons and testEvents be set for OGNL, or available for me to use in this.

Number of Persons: <ww:property value="#testPersons.persons.size"/><br/>
Number of Events: <ww:property value="#testEvents.events.size"/><br/>


Since persons and events are Lists returned from calls made in the listPersons and listEvents actions and via the OGNL I can get at them

#testPersons.persons.size
#testEvents.events.size

Now I have no idea how this works and am really actually confused in general with all of this WebWork stuff so if anyone can please explain how what I just described happen/works I would be very thankful!

Have a wonderful and happy new year!
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=55909&messageID=111114#111114