Struts: getting multiple selected values from a select element
843836Jan 26 2004 — edited Mar 30 2006Hi 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