Check the indexed getters n Form...If the beanList in form is empty,The beans are added as required when getter is called.. I was referring to this... -----Original Message----- From: Ritesh Singhal [mailto:ritesh_singhal@infosys.com] Sent: Wednesday, March 26, 2003 3:01 PM To: Struts Users Mailing List Subject: RE: Setting and Getting indexed property I think that helps. But you were talking something about Lazy initialization. What is that? Thanks and Regards Ritesh -----Original Message----- From: shirishchandra.sakhare@ubs.com [mailto:shirishchandra.sakhare@ubs.com] Sent: Wednesday, March 26, 2003 7:09 PM To: struts-user@jakarta.apache.org Subject: RE: Setting and Getting indexed property look at the following message in the archive... http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2 -----Original Message----- From: Ritesh Singhal [mailto:ritesh_singhal@infosys.com] Sent: Wednesday, March 26, 2003 1:55 PM To: Struts Users Mailing List Subject: RE: Setting and Getting indexed property I couldn't find anything in the mailing list. Actually I am new to this group. Do you know any resources on the internet where using indexed property and lazy intialization is explained. Regards Ritesh -----Original Message----- From: shirishchandra.sakhare@ubs.com [mailto:shirishchandra.sakhare@ubs.com] Sent: Wednesday, March 26, 2003 6:06 PM To: struts-user@jakarta.apache.org Subject: RE: Setting and Getting indexed property U need to use lazy initialiszation. Search the mail archive...I had replied some similar mail... regards, Shirish -----Original Message----- From: Ritesh Singhal [mailto:ritesh_singhal@infosys.com] Sent: Wednesday, March 26, 2003 1:04 PM To: Struts Users Mailing List Subject: Setting and Getting indexed property Hi All, I am having problem setting and getting indexed property of a form bean. I have a form bean: public class ExampleForm extends ActionForm { private String id[]; private String name[]; private String address[]; public String getIdIndexed( int index ) { return ( id[index] ); } public void setIdIndexed(int index, String value) { id[index] = value; } ..... And so on } With appropriate getter and setter methods. Now in my jsp page I am trying to access these fields and display them in a table format. Something like this: I want to have the same form bean for create and edit page of the entity. So in create page I will have a table with blank fields and in edit page I will have prepopulated fields. Also in edit page I shud be able add more rows for the table. Now I don't know what property name to give in create page of the entity. Above code works fine when form bean is already populated, but problem comes when you want to create the entity. Do I need to initialize the array? And of what size? As I want it to be dynamic. Also in create page I want some default number of rows with blank pages. What shud be the property name for those text fields? Please help me. I am stuck coz of this problem. Thanks and Regards Ritesh --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org