Is there any way to show all the multiple selected values on the top.
eg. if the list contains 1 to 10 and selected values are 4,8 then the listbox should have values like 4,8,1,2,3,5,6,7,9,10
Is there any way to show all the multiple selected values on the top.
Share
These are the two common ways to list data for selects.
The first one uses an array, and you can define, relocate your array keys based on user preference.
On second, probably introducing a Criteria in the findAll() call that will order the user chosen values first, it will do the job.
Update
You could go something like:
in examples:
See the code in action http://ideone.com/6BDxQ