Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-06-2008, 08:14 AM
Member
 
Join Date: Nov 2007
Posts: 3
swapnanair is on a distinguished road
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 12:26 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-06-2008, 12:17 PM
rjuyal's Avatar
Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 92
rjuyal is on a distinguished road
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.
__________________
Life was much better in 2021
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox Add/Delete Rageagainst20 New To Java 2 04-16-2008 05:49 PM
Adding custom highlight to JEditorPane andrewb AWT / Swing 0 06-22-2007 07:48 PM
GNU Source-highlight 2.7 levent Java Announcements 0 06-12-2007 09:39 AM
How to select/highlight an entire row in JTextArea Valeriano AWT / Swing 2 05-28-2007 12:20 PM


All times are GMT +3. The time now is 06:00 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org