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 Getting multiple drop down list value from view using JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Getting multiple drop down list value from view using JSF 2.0" Watch "Getting multiple drop down list value from view using JSF 2.0" New topic
Author

Getting multiple drop down list value from view using JSF 2.0

Hei Ching
Greenhorn

Joined: Dec 06, 2012
Posts: 1
I am trying to use JSF to retrieve multiple drop down lists according to user input from the view to controller.

However seems I cannot find the correct way.

As the drop down lists are generated dynamically, I cannot hard code the id / name of the drop down list.

Here is my code in the view:

I thought I could declare a List named studentSelections in the controller so that I could get all the user input of the drop down list, but seems I have failed.

So could anyone give a hand on it?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Welcome to the JavaRanch, Hei Ching!

If by "in the controller" you mean the backing bean (which isn't a Controller, it's the Model), you will find it a lot easier if you use a dataTable instead of a ui:repeat.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting multiple drop down list value from view using JSF 2.0
 
Similar Threads
Error when populating values in a drop down list in JSF
Listener event in a <f:ajax> tag doesn't get fired in the server side
ajax events not triggered in dynamically included pages
Parameters not passed into the s:link
Iterating over columns and rows in a data table