File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSF
Bookmark "Add a value to Drop-Down List" Watch "Add a value to Drop-Down List" New topic

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:
subject: Add a value to Drop-Down List
It's not a secret anymore!