--- On Thu, 12/11/08, Ronny Løvtangen wrote:
> On Dec 11, 2008, at 11:26 PM, Musachy Barroso wrote:
> > <s:push value="foo">
> > <s:iterator value="bars[#action.index - 1 * Math.PI]">
> > <s:textfield name="baz" />
> > </s:iterator>
> > </s:push>
> >
> > what would the name be in that case?
>
> How would you handle the request parameters from this form?
Indexed properties are built by hand; a shortcoming:
<s:push value="foo">
<s:iterator value="bars[#action.index]" status="stat">
<s:textfield name="baz" />
<%-- name="foo.bars[#action.index][#stat.index].baz" --%>
<%-- ... unless it's a map. --%>
</s:iterator>
</s:push>
It's just a matter of keeping track of the names of objects pushed onto the
stack, whether it's being pushed by a <s:push...>, <s:iterator...>, or whatever
else can push stuff.
Some use-cases are more difficult than others. You still have to track the name
where the value was found in order to create the form field's "name"
attribute--or leave it as-is once you reach the action level (or use #action?)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]