File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Add a value to Drop-Down List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Add a value to Drop-Down List" Watch "Add a value to Drop-Down List" New topic
Author

Add a value to Drop-Down List

Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
I have a form where I have text field for the Name of Financial Institution, one check box to Add to Financial Institution List and one Drop down for Select Financial Institution. If we enter a name in the Name field and checked the check box and then hit the OK button of the form the name of the Name should be added in the Drop down for Select Financial Institution. When we come back to that form in edit mode we can see that Name in the Drop down Financial Institution.
I have using the “finOrgs” in the JSP and using the public List<SelectItem> getFinOrgs() to display the values in the drop down menu. I am using the condition for checking the checkbox and setting the value in the OK handler. I am getting the right value here newFinOrg.setName(getActiveLienholder().getName());

But I am not able to return the right value from the public List<SelectItem> getFinOrgs()
Because I am getting problem to add the right value which is newFinOrg.setName(getActiveLienholder().getName()); to the drop down Select menu.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add a value to Drop-Down List
 
Similar Threads
JSF h:selectOneMenu concern
SelectItem Help needed
Birth Date nightmare - passing variable between beans and java objects
Bean Value is always Null
JSF Checkbox Group