You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sashi Ravipati <Ra...@michigan.gov> on 2003/06/11 22:19:17 UTC

what setters do i implement in an indexed tag --NewBie question

Can some body help in as how to define get and set methods when we use indexed tags.

eg:

<logic:iterate id="person" name="myFormBean" property="personList">
  <tr>
    <td>
      <bean:write name="person" property="name"/>
      <html:hidden name="person" property="name" indexed="true"/>
    </td>
    <td>
      <html:text name="person" property="phoneNo" indexed="true"/>
    </td>
  </tr>
</logic:iterate>

What will be the get and set methods. 

Thanks

Re: what setters do i implement in an indexed tag --NewBie question

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Sashi, your person bean must have getName(), setName() and getPhoneNo(), 
setPhoneNo().

Everybody: I haven't come across the html:taglib indexed property 
before. This seems to do what nested: tags do - is this functional overlap?

Generally with JST taglib as well, there seems to be a wide choice of 
taglibs to use - is this going to consolidate at some point in struts' 
development?

Adam


Sashi Ravipati wrote:
> Can some body help in as how to define get and set methods when we use indexed tags.
> 
> eg:
> 
> <logic:iterate id="person" name="myFormBean" property="personList">
>   <tr>
>     <td>
>       <bean:write name="person" property="name"/>
>       <html:hidden name="person" property="name" indexed="true"/>
>     </td>
>     <td>
>       <html:text name="person" property="phoneNo" indexed="true"/>
>     </td>
>   </tr>
> </logic:iterate>
> 
> What will be the get and set methods. 
> 
> Thanks
> 


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