Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts: getting multiple selected values from a select element

843836Jan 26 2004 — edited Mar 30 2006
Hi Friends,
I am a total newbie with struts,I have manage to run a simple login script,
Now I was wonderingif there is a select box and user has the ability to select multiple values from it how do I get those values in the *Form class
my select tag looks like this

<html:select property="listboxValue" mulitple="mulitple">
...options--

</html:select>

in the ****Form extends ActionForm{....I have setter and getters for getting the value from select box as below

public void setListboxValue(String value){
this.listboxValue = value;



and the getter is
public String getListboxValue(){
return this.listboxValue ;
}

please never mind the missing brackets and such.

What I was hoping to get to work was something like this

public void setListboxValue(String[] value){
this.listboxValue = value;

but that does not work...If I have the an array being passed,it seems like this method is no even envoked
Please guide me

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2006
Added on Jan 26 2004
6 comments
657 views