You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cm132005 <cm...@gmail.com> on 2009/05/08 03:05:06 UTC

s:iterator and form submission

<s:form action="Example.do" method="post">
   <couple of fields and buttons/>
   <couple of fields and buttons/>
    <s:iterator id="aVO" value="listAVOs"> 
      <s:property value="aId"/>
      <s:hidden name="aId" />
      <s:property value="aName"/>
      <s:property value="aPhone"/>
      <s:submit value=" Edit " method="edit" />
    </s:iterator>
</s:form>    

When the Edit is submitted, the aId passed in is actually a String of comma
separated aIds of all aVOs. The requirement is such that I need to use the
same form instead of having a s:form tag within the iterator. How to submit
the correct indexed value? 

Thanks.
-- 
View this message in context: http://www.nabble.com/s%3Aiterator-and-form-submission-tp23438385p23438385.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: s:iterator and form submission

Posted by Dave Newton <ne...@yahoo.com>.
Rene Gielen wrote:
> http://struts.apache.org/2.1.6/docs/tabular-inputs.html

In addition (it's on my infinite list of things I have no time for) 
AFAIK if there are multiple parameters with the same name and a 
collection property (like a List) they'll be marshalled into the list 
automagically without having to do anything special.

If order is important, of course, it's best to use the indexed notation.

(Man, now that I've written that all out, I sure hope I'm remembering 
that right and that I actually *did* do that :/

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: s:iterator and form submission

Posted by Rene Gielen <gi...@it-neering.net>.
http://struts.apache.org/2.1.6/docs/tabular-inputs.html

cm132005 schrieb:
> <s:form action="Example.do" method="post">
>    <couple of fields and buttons/>
>    <couple of fields and buttons/>
>     <s:iterator id="aVO" value="listAVOs"> 
>       <s:property value="aId"/>
>       <s:hidden name="aId" />
>       <s:property value="aName"/>
>       <s:property value="aPhone"/>
>       <s:submit value=" Edit " method="edit" />
>     </s:iterator>
> </s:form>    
> 
> When the Edit is submitted, the aId passed in is actually a String of comma
> separated aIds of all aVOs. The requirement is such that I need to use the
> same form instead of having a s:form tag within the iterator. How to submit
> the correct indexed value? 
> 
> Thanks.

-- 
René Gielen
IT-Neering.net
Saarstrasse 100, 52062 Aachen, Germany
Tel: +49-(0)241-4010770
Fax: +49-(0)241-4010771
http://twitter.com/rgielen

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org