You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ashwin Sarin <as...@yahoo.com> on 2002/11/05 19:18:18 UTC

indexing items in an ActionForm

I am binding my HTML form to the following ActionForm
bean(only showing interface):

public MyForm extends ActionForm {
    public void setPartDescription( String s );
    public String getPartDescription( );
}

I'd like to list my parts in a table under the same
form, so i'd rather use a Form such as the following:

public MyForm extends ActionForm {
    public void setPartDescription( int index, String
s );
    public String getPartDescription( int index );
}

Is there any way to get struts to bind to a bean like
this?  Basically i'd like the MyForm form to
internally contain a collection of Parts and set the
Description(or other properties) based on the index
passed in to the set and get methods of each property.

thanks,
Ashwin


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>