This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes how to show multiple saved values as selected in h:selectManyListBox Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how to show multiple saved values as selected in h:selectManyListBox" Watch "how to show multiple saved values as selected in h:selectManyListBox" New topic
Author

how to show multiple saved values as selected in h:selectManyListBox

Amee Dabo
Ranch Hand

Joined: Dec 22, 2001
Posts: 74
Hi,
I want to show multiple values in list box& I should be able to select & save & retrieve saved values. e.g. In a employee table I have column for skills in which I want to store selected skills as comma seperated string.

The list for skills which I am showing using h:selectManyListBox tag. When I am selecting more than 1 values here those I am saving in database as comma seperated string. e.g html,jsp,vb,java etc. But when i am opening the details for this employee for whom I have saved multiple skills; I am not getting how to show already saved skills as selected in this select many box.

can anybody help please..

Thanks in advance,
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
The valuebinding of the selectManyListBox should be mapped to a List.


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to show multiple saved values as selected in h:selectManyListBox
 
Similar Threads
Using dropDown in jsf
Struts value into a javascript function
retreive selected value of list box
Window.Opener Problem
Struts 1.1: Help needed with html:select, html:options, html:optionsCollection