View Full Version : To highlight multiple selected values in listbox using struts

05-06-2008, 07:54 AM

I have a registration form where i am using a listbox where we can select multiple values.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 highlight 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.



05-07-2008, 11:33 PM
It's not quite clear what you need. If you want to pre-select values for a select field in a JSP page before it's presented to the user (ie they are loaded from a database), you should construct the <option> or <html: option> tags with a loop and append "selected='selected'" to those stored.

10-06-2009, 10:07 AM
HI mallik83 ,
I need ur code.NOw i have to include this code for requirement.Pls share the code for this

Thanks in advance

10-06-2009, 10:08 AM
pls share the code for this requriment very veryUrgent!!!!

10-06-2009, 10:19 AM
pls share the code for this requriment very veryUrgent!!!!

This thread is 1.5 years old. It is highly improbable that the original poster will return to share their code.