This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting multiple drop down list value from view using JSF 2.0

 
Hei Ching
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17633
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic