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

Identify selectone inside DataTable

 
Gabriel Beres
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have a datatable, which content is created programatically. At every row, there is a selectone componenent. These selectone-s have a JSF valuechangelistener attached, and when the user change the value, the valuechangelistener fires.

Since the selectone is in a datatable, i need to identify the selectone-s, based on the var attribute of the table. For example if var is a Category object. i would like to set the selectone-s id to myselect_#{category.category_id}. Then i could get this id on the valuechanged event handler, and do something with it.

The problem is when i try this:

selectone.setValueExpression("id", JSFUtils.createValueExpression("#{category.category_id}", String.class));

I bet this is not valid, because it gives me IllegalArgument exception.

Is there another way, to do what i want? (note that i use JSF 2.0)

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic