Results 1 to 2 of 2
- 05-06-2008, 07:14 AM #1Member
- Join Date
- Nov 2007
- Rep Power
To highlight multiple selected values in listbox
I am working with struts application. I have a registration form where i am using a listbox of multiple selection. I am storing these values concatenating with commas(for eg. A,B,C).Now i have to update this registration form, so i have to retrieve these values and to hightlight the previously selected values.
I have the idea that first i have to retrieve that field from database and split the commas and then i have to write the code in the front end to display the values.
But in real time i m unable to display in front end.
please.....Can anyone help me.
Last edited by swapnanair; 05-06-2008 at 11:26 AM.
- 05-06-2008, 11:17 AM #2
If you are using Spring framework then you just have to provide the path of the variable, which is going to store the value(s) of listbox selection, and it will automatically select the specified value.
Otherwise ( apart from that splitting string using "," )
you can use String also,
if the valueOfCurrentItemInList==Strin[i] // traverse it
then used selected keyword
of listbox.i am the future
- By Rageagainst20 in forum New To JavaReplies: 2Last Post: 04-16-2008, 04:49 PM
- By andrewb in forum AWT / SwingReplies: 0Last Post: 06-22-2007, 06:48 PM
- By levent in forum Java SoftwareReplies: 0Last Post: 06-12-2007, 08:39 AM
- By Valeriano in forum AWT / SwingReplies: 2Last Post: 05-28-2007, 11:20 AM