File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes selectManyListbox question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "selectManyListbox question" Watch "selectManyListbox question" New topic

selectManyListbox question

Ruther Ford

Joined: Mar 13, 2007
Posts: 5
I am new to jsf.
I've two selectManyListboxes and I need to move the values from
one selectManyListbox to another.
From the bean I am passing the values to the selectManyListbox are of
SelectItem[] type values.
Could anybody explain me that how to do this
any help is appreciated.

thanks and regards
Ruther Ford

Joined: Mar 13, 2007
Posts: 5
any help
Kumar Saravanan
Ranch Hand

Joined: Aug 25, 2004
Posts: 40
Hi Ruther,

Say you have 2 selectManyListBox, one is source and another is destination.

Create a property in your backing which is of type Map and bind it to your source selectManyListBox and do the same for destination selectManyListbox. During the initial load the destination one will be empty.

Use Ajax to show the selected item from the source to destination.

Since you are binding the selected value(s) to a property in your backing bean you can easily access the value in another selectManyListBox.

Kumar Saravanan
narender sunkam
Ranch Hand

Joined: May 01, 2004
Posts: 30
Hi Kumar Saravanan,
Thanks for your reply.
My problem is I've the SelectItems[] values then how to add or remove the values I didn't find any such method for SelectItem[].I found only length for that.
Please could explain me with a small example.
Here I am sending the code

Here is the jsp code


narender kumar
Andres Quinones
Ranch Hand

Joined: Oct 09, 2006
Posts: 57
Hi Ruther, maybe you could try using Sandbox component selectManyPicklist.
Here you have an example

I hope this helps
I agree. Here's the link:
subject: selectManyListbox question
It's not a secret anymore!