This content has been marked as final.
Show 2 replies
-
1. Re: Getting the selection from a ScrollableDataTable
cardel Apr 25, 2008 7:49 PM (in response to mbinna)I have the same problem. It looks like some bug. DataModelSelection is returned in right way when I use the same dataTable without sorting or filtering. When I use same table with sorting or filtering I get only one (I think the last) record returned as DataModelSelection from all rows of table.
-
2. Re: Getting the selection from a ScrollableDataTable
mbinna May 5, 2008 6:34 AM (in response to mbinna)Ok, finally I got it working using a h:dataTable and using the annotation DataModel and DataModelSelection. I think the problem was that the action was not triggered in the column but by a button global to all columns of the table.
I'm relatively new to J2EE and Seam, so it might be possible to get that working too if one as enough experience. If someone has good advice, please let me know. ;-)
in Manager.java:@DataModel private List<Item> itemList; @DataModelSelection("itemList") private Entity selectedItem;
Code from list.xhtml:<h:dataTable value="#{itemList}" var="item"> <h:column> <h:commandLink value="#{item.description}" action="#{manager.edit}"/> </h:column> </h:dataTable>
Regards, Manuel Binna