Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Nuwan Chandrasoma
n a previous session. So if there are five check boxes and the user selects three of them and submits the form, how do I automatically check the three boxes when the user returns the next day? It appears that returning a string array with the u

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread Dave Newton
--- On Tue, 7/1/08, David Ogasawara <[EMAIL PROTECTED]> wrote: > I was avoiding checkboxlist because I wanted the options to be > displayed vertically, but it looks to be the only option unless > I add more code to determine if a checkbox was selected. Or use the "css_xhtml" theme, which IIRC ju

Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Jim Kiley
PROTECTED]> wrote: > This is exactly what I needed. I was avoiding checkboxlist because I > wanted the options to be displayed vertically, but it looks to be the > only option unless I add more code to determine if a checkbox was > selected. > > Thank you, everyone, for your he

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread David Ogasawara
Chandrasoma [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 9:16 AM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes Hi, I have done it like this. // code in my action private String[] skill; public String[] getSkill() { return skill

Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Nuwan Chandrasoma
uwan Chandrasoma [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:57 PM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread David Ogasawara
:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 9:04 AM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes >>So if there are five check boxes and the user selects three of >>them and submits the form, how do I automatically check the three boxes >>when th

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread Dave Newton
Message- > From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2008 9:57 PM > To: Struts Users Mailing List > Subject: Re: [S2] Pre-populating Checkboxes > > Hi, > > This is how i do it, i have implemented the prepreable > interface in m

Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Struts Two
>>So if there are five check boxes and the user selects three of >>them and submits the form, how do I automatically check the three boxes >>when the user returns the next day? If I have understood your question right, you need to persist user selection (say in a database). What you are asking e

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread David Ogasawara
ne 30, 2008 9:57 PM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to display in as check box values. eg:- private List s

Re: [S2] Pre-populating Checkboxes

2008-06-30 Thread Nuwan Chandrasoma
Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to display in as check box values. eg:- private List skills; public List getSkills() { return skills; } public void prepare() throws E

[S2] Pre-populating Checkboxes

2008-06-30 Thread David Ogasawara
Hello, I'm new to Struts 2 and I was wondering how to pre-populate checkboxes with values from a database (or even hard-coded values). I am iterating through an arraylist of hashmaps (description, type_cd) to create the checkboxes in the form. I then create a string array with the values from a