This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with t:selectManyListbox" Watch "Problem with t:selectManyListbox" New topic
Author

Problem with t:selectManyListbox

Ramesh Kumar
Ranch Hand

Joined: Dec 28, 2004
Posts: 33
Hello,

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"
value="#{internalMessageDataBean.selectedUsersList}">
<f:selectItems id="listOfUsers"
value="#{internalMessageDataBean.listOfUsers}" />
</t:selectManyListbox>

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: http://aspose.com/file-tools
 
subject: Problem with t:selectManyListbox