Hi Dave, I am getting the below errors
15:18:15,192 ERROR [xwork2.util.XWorkMethodAccessor] An unexpected exception occurred ognl.OgnlException: Error getting property descriptor: null at com.opensymphony.xwork2.util.XWorkCollectionPropertyAccessor.getProperty(XWorkCollectionPropertyAccessor.java:92) at com.opensymphony.xwork2.util.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:61) at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:819) :::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::: at java.lang.Thread.run(Thread.java:595) 15:18:15,202 ERROR [xwork2.util.OgnlValueStack] Error setting expr 'person.roles(0).name' with value '[Ljava.lang.String;@1e001c8' ognl.OgnlException: target is null for setProperty(null, "name", [Ljava.lang.String;@1e001c8) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624) I have Person-conversion.properties in the "zm.junk" package. It is the same package where I have the Person and Role class CreateIfNull_roles=true Element_roles=zm.junk.Role And as for the other question I do not have the roles initialized. Thanks Zafer ----- Original Message ---- From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List <user@struts.apache.org> Sent: Saturday, February 3, 2007 1:24:58 PM Subject: [S2] Re: Populating collection in struts 2 Action properties --- zafer Mohamed <[EMAIL PROTECTED]> wrote: > I am struggling to populate a collection in the > struts action's attribute. You neglect to say what the problem actually is, so helping is... tricky. > <s:textfield label="Name" > name="person.roles(0).name" /> As prev. poster said use [0], but this will only work if you've actually initialize the Person's list of Roles. Have you? There shouldn't be an issue with what you're doing, and you do not need indexed get/sets in S2. (Yaaay, S2/WW!) d. ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news