May be like this: public class Records{ private List records = new ArrayList(); //Constructor public addRecord(Record record){ records.add(record); } // get and set methods }
public class Record { private Liste subRecords = new ArrayList(); private String name=null; private String description = null; //Constructor public addSubRecord(SubRecord subRecord){ subRecords.add(subRecord); // get and set methods } } public class SubRecord{ //Constructor private String name=null; private String description = null; // get and set methods } So in your class Action you construct the Records objetcs and you display it in the JSP page using <bean:define> and <logic:iterate> tags Hope it helps you -----Message d'origine----- De : Richard Raquepo [mailto:[EMAIL PROTECTED] Envoyé : Friday, March 21, 2003 10:12 AM À : Struts Users Mailing List Objet : creating my Class I am in the process of designing a class but coudn't figure out how to start it because i'm thinking how struts tags will display my info. My expected output is like this Record1 blah blah Record1_sub_detail1 blah Record1_sub_detail1 blah Record1_sub_detail1 blah Record2 blah Record3 blah Record3_sub_detail1 blah I don't how will be the data type of my class probably it will look like this: class Record { ArrayList record; ArrayList subrecord[]; } r really don't what to use really. Can someone give me some idea and also how will i be able to display it in my JSP using struts tags. thanks a lot. -Richard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]