-
1. Re: row selection in rich:dataTable
abcd1 Feb 2, 2008 6:06 AM (in response to abcd1)can anyone provide any link to a tutorial, showing row selection in dataTable
-
2. Re: row selection in rich:dataTable
mail.micke Feb 2, 2008 6:44 AM (in response to abcd1)If you use binding for the datatable you should be able to get the selected row from the component.
In the Richfaces docs there is some code showing which class the datatable component is. -
3. Re: row selection in rich:dataTable
mfinkenzeller Feb 4, 2008 12:24 AM (in response to abcd1)There are two ways I have gone about it. One way is to use binding attribute with property on bean being UIData. From there you can get the rowIndex or selected row. The other way is to use the rowkey if you are using a rich:dataTable along with actionparam to pass the selectedRow based on a action in the table. Kind of depends on the type of components in the cell, inputs versus text.
<rich:dataTable binding="#{table.dataModel}" rowkey="#{rowkey}">
<rich:column>
<a4j:commandLink action="#{someaction}">
<a4j:actionparam name="selectedRow" value="#{rowkey}"/>
</a4j:commandLink>
</rich:column>
</rich:dataTable> -
4. Re: row selection in rich:dataTable
aish Feb 4, 2008 6:04 PM (in response to abcd1)Thanks for the information. I tried the logic and encountered some problem with it. Please correct me if my understanding is not correct.
There is no "onRowClick" attribute in datatable to select the row where as we have this attribute in scrollabledatatable. Without this, is it possible to select a row from the datatable.
Thanks in advance for your clarification.
Aish -
5. Re: row selection in rich:dataTable
aish Feb 4, 2008 6:06 PM (in response to abcd1)Please ignore my previous note.. It was my mistake that I overlooked dataList component instead of dataTable. I do see onRowClick in dataTable.
Thanks
Aish -
6. Re: row selection in rich:dataTable
aish Feb 4, 2008 6:06 PM (in response to abcd1)Please ignore my previous note.. It was my mistake that I overlooked dataList component instead of dataTable. I do see onRowClick in dataTable.
Thanks
Aish