You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Trollinger <jt...@gmail.com> on 2007/02/28 17:06:14 UTC

[S2] replacement for indexed="true"

I am trying to use struts 2 and can not figure out how to do the following
that I could in struts 1.3

<logic:iterate name="person" property="addresses" id="address"
indexId="ctr">
  <html:text name="address" property="addrLineOne" indexed="true" />
  <html:text name="address" property="addrLineTwo" indexed="true" />
  <html:hidden name="address" property="id" indexed="true"/>
</logic:iterate>

is there still a way to do this in struts 2 so I can update / add / remove
child list objects?

thanks,

John

Re: [S2] replacement for indexed="true"

Posted by Adam Ruggles <a....@gmail.com>.
The first example you give on vitarara.org is the correct method.

Mark Menard wrote:
> On 2/28/07 11:06 AM, "John Trollinger" <jt...@gmail.com> wrote:
>
>   
>> I am trying to use struts 2 and can not figure out how to do the following
>> that I could in struts 1.3
>>
>> <logic:iterate name="person" property="addresses" id="address"
>> indexId="ctr">
>> <html:text name="address" property="addrLineOne" indexed="true" />
>> <html:text name="address" property="addrLineTwo" indexed="true" />
>> <html:hidden name="address" property="id" indexed="true"/>
>> </logic:iterate>
>>
>> is there still a way to do this in struts 2 so I can update / add / remove
>> child list objects?
>>     
>
> I've only done a little development with Struts 1, over 1.5 years ago. I'm
> not sure if this would apply, but look at:
>
>     http://www.vitarara.org/cms/node/81
>
> I wrote that when I started working with Struts 2. There is also a comment
> in there with a link to a WW thread on the Opensymphony forum that has a
> different technique, that seems simpler. I haven't tried the suggested
> method yet. When I get time I will write up an explanation of that if I get
> it working to my liking.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


Re: [S2] replacement for indexed="true"

Posted by Mark Menard <ma...@mjm.net>.
On 2/28/07 11:06 AM, "John Trollinger" <jt...@gmail.com> wrote:

> I am trying to use struts 2 and can not figure out how to do the following
> that I could in struts 1.3
> 
> <logic:iterate name="person" property="addresses" id="address"
> indexId="ctr">
> <html:text name="address" property="addrLineOne" indexed="true" />
> <html:text name="address" property="addrLineTwo" indexed="true" />
> <html:hidden name="address" property="id" indexed="true"/>
> </logic:iterate>
> 
> is there still a way to do this in struts 2 so I can update / add / remove
> child list objects?

I've only done a little development with Struts 1, over 1.5 years ago. I'm
not sure if this would apply, but look at:

    http://www.vitarara.org/cms/node/81

I wrote that when I started working with Struts 2. There is also a comment
in there with a link to a WW thread on the Opensymphony forum that has a
different technique, that seems simpler. I haven't tried the suggested
method yet. When I get time I will write up an explanation of that if I get
it working to my liking.

Mark

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