If you want to use an array for a property that your JSP uses as indexed (i.e. property="data(n)") you will have to define indexed getters and setters :
public void setData(index i, String value) { this.data[i] = value; } public String getData(index i) { return this.data[i]; } Struts will not create an instace of the array for you when it creates or populates the formBean. Your form-bean has to create the array in the "good" size before population occurs. Nico. > Hello! > > Is is possible to deal with an Array of Beans in an AtionForm? > > It should look like this: > > public class TestForm extends ActionForm { > private DataBean[] dataBeans = DataBean[size_of_array]; > > getter and setter methods > } > > public class DataBean { > private String name=""; > private int id = 0; > > getter and setter methods > } > > Searching the list I have found the following important facts: > > - It is important to have an default construktor in the ActionForm, which > creates an instance of the Array. > > Have somebody some code example to help me? > > Kind regards, > > Arne > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]