aspose file tools*
The moose likes JSF and the fly likes Identify selectone inside DataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Identify selectone inside DataTable" Watch "Identify selectone inside DataTable" New topic
Author

Identify selectone inside DataTable

Gabriel Beres
Ranch Hand

Joined: Sep 09, 2006
Posts: 61
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
 
subject: Identify selectone inside DataTable