Two Laptop Bag
The moose likes JSF and the fly likes Problem with t:selectManyListbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with t:selectManyListbox" Watch "Problem with t:selectManyListbox" New topic

Problem with t:selectManyListbox

Ramesh Kumar
Ranch Hand

Joined: Dec 28, 2004
Posts: 33

I have a select many list box. in that list box i have some user names and some department names. I need to send mails to the selected. Let us say if 2 users and one department is selected then i need to send the mails to all users of selected department and selected users (2 users).

For the requirement i am careting the list like following

listOfUsers.add(new SelectItem("1", "Ramesh", "User"));
listOfUsers.add(new SelectItem("2", "Suresh", "User"));
listOfUsers.add(new SelectItem("3", "Accounting", "Department"));

And i have coded my jsp like the following.

<t:selectManyListbox id="mailRecieversList" size="3"
<f:selectItems id="listOfUsers"
value="#{internalMessageDataBean.listOfUsers}" />

I am able to get the list of selected things in my controller. But what i am getting is only id of selected item. From that again i need to process the list for determing whether selected thing is actually a user or depatrment.

Can i get the description in any way back?. Or in any way can i accomplish this?.

Such that i need not process again?.

- Ramesh
I agree. Here's the link:
subject: Problem with t:selectManyListbox
It's not a secret anymore!