I am currently trying to pass the value of an iterator to an action. This is what it should look like (sort of):
<ww:action name="entries" id="entries"/>
<ww:iterator value="#entries.entries" >
<ww:property value="name" />
<ww:property />
<ww:action name="edit" id="edit" >
<ww:param name="entry" value="???" />
</ww:action>
</ww:iterator>
How do I get the value of the current top stack value passed to the edit action? Things like value'<ww:property />' don't work.
Are there any other approaches to get this to work? Is the ww:action the right one?
You should be able to push the value that you're looking for onto the stack like so:
<ww:action name="entries" id="entries"/> <ww:iterator value="#entries.entries" > <ww:property value="name" /> <ww:property /> <ww:push value="..."/>
<ww:action name="edit" id="edit" > <ww:param name="entry" value="[0]" /> </ww:action> </ww:iterator>
the [0] refers to the top of the value stack
ps. What I would also like to know is how I could pass this to a JSP page (directly) without going through an action first (obviously the entry needs to be edited somewhere in the end).
pps. The reason for going through this trouble is that I don't like passing IDs around. (That would be too easy ;-))
This should be able to be called directly without having to pass through an Action first.
M
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork