Re: [S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread Dave Newton
--- zafer Mohamed <[EMAIL PROTECTED]> wrote: > Person-Conversion.properties [This should be in the > same package as the Person class] with the below > contents I re-read the type conversion page; obviously your way works, but the docs are somewhat vague or ill-worded. It works my way too :) > Th

Re: [S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread zafer Mohamed
uary 3, 2007 4:33:21 PM Subject: Re: [S2] Re: Populating collection in struts 2 Action properties --- zafer Mohamed <[EMAIL PROTECTED]> wrote: > Initializing the collection also did not help. If > possible can you please let me know what are the > conversion-properties files u have

Re: [S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread Dave Newton
--- zafer Mohamed <[EMAIL PROTECTED]> wrote: > Initializing the collection also did not help. If > possible can you please let me know what are the > conversion-properties files u have and their > location [should they be in the package of the class > or in the classpath] and does it need any addit

Re: [S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread zafer Mohamed
- Original Message From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Saturday, February 3, 2007 3:38:03 PM Subject: Re: [S2] Re: Populating collection in struts 2 Action properties --- zafer Mohamed <[EMAIL PROTECTED]> wrote: > I have Person-conversio

Re: [S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread Dave Newton
--- zafer Mohamed <[EMAIL PROTECTED]> wrote: > 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 initiali

Re: [S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread zafer Mohamed
. Thanks Zafer - Original Message From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List 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 strug

Re: Populating collection in struts 2 Action properties

2007-02-03 Thread zafer Mohamed
I also added Person-conversion.properties with the below entries CreateIfNull_roles=true Element_roles=zm.junk.Role Zafer - Original Message From: Saul Qunming Yuan <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Saturday, February 3, 2007 1:14:43 PM Subject: Re: Populating collection in

[S2] Re: Populating collection in struts 2 Action properties

2007-02-03 Thread Dave Newton
--- 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. > name="person.roles(0).name" /> As prev. poster said use [0], but this will only work if you've

Re: Populating collection in struts 2 Action properties

2007-02-03 Thread Saul Qunming Yuan
Hi, You may want to try the following: 1. add index-based getter and setter to your Person bean class, i.e. public Role getRoles(int i) { return (Role) getRoles().get(i); } public void setRoles(int i, Role role) { getRoles().set(i, role); } 2. use [0] rather than (0) for your name field

Populating collection in struts 2 Action properties

2007-02-03 Thread zafer Mohamed
I am struggling to populate a collection in the struts action's attribute. My scenario is similiar to below public class PersonAction extends ActionSupport { private Person person; public void setPerson(Person person){ this.person = person} public Person getPerson(){ return person} pu