This content has been marked as final.
Show 2 replies
-
1. Re: Getting the selection from a ScrollableDataTable
andygibson.contact.andygibson.net Apr 25, 2008 10:41 PM (in response to mbinna)If you change it from the scrollableDataTable to a regular data table, does the selection work? If not, can you post the relevant pieces of code?
Cheers,
Andy Gibson
-
2. Re: Getting the selection from a ScrollableDataTable
mbinna May 5, 2008 12:31 PM (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. ;-)
Code from 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