dcsimg
selectManyListbox PreSelecting Values
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   igorr_nemits
Posted On:   Tuesday, March 18, 2008 04:51 PM

selectManyListbox PreSelecting Values Hi guys, I'm new to JSP and I'm having problems PreSelecting Values in a selectManyListbox. I don't have a problem filling the selectManyListbox, the problem comes when I try to preselect items private ArrayList listOption=new ArrayList (); public ArrayList getListOption(){ return listOption; } public void setListOption(ArrayList newValue){ this.listOption=newValue; } private ArrayList listOptionSelected=new ArrayList (); public ArrayList getListOptionSelected(){ return listOption; }    More>>

selectManyListbox PreSelecting Values

Hi guys,

I'm new to JSP and I'm having problems PreSelecting Values in a selectManyListbox. I don't have a problem filling the selectManyListbox, the problem comes when I try to preselect items


private ArrayList listOption=new ArrayList ();




public ArrayList getListOption(){

return listOption;

}



public void setListOption(ArrayList newValue){

this.listOption=newValue;

}




private ArrayList listOptionSelected=new ArrayList ();




public ArrayList getListOptionSelected(){

return listOption;

}



public void setListOptionSelected(ArrayList newValue){

this.listOptionSelected=newValue;

}







//list of items

listOption.add(new SelectItem("1","Cheese")) ;

listOption.add(new SelectItem("2","Pickle")) ;

listOption.add(new SelectItem("3","Mustard")) ;

listOption.add(new SelectItem("4","Lettuce")) ;

listOption.add(new SelectItem("5","Onions")) ;




//list of selected items

listOptionSelected.add(new SelectItem("1","Cheese")) ;

listOptionSelected.add(new SelectItem("5","Onions")) ;










































   <<Less
About | Sitemap | Contact