This content has been marked as final.
Show 1 reply
-
1. Re: How to get selected rows?
meurisse Nov 16, 2007 7:36 AM (in response to liangjian)I used a binding to a UIData object e.g. schoolTableData)
something like:<rich:dataTable id="schoolTable" binding="#{yourBean.schoolTableData}" ... In your controller bean: UIData table = yourBean.getSchoolTableData(); for (int rowIndex = 0; rowIndex < table.getRowCount(); rowIndex++) { // Select the a row (if there is one) table.setRowIndex(rowIndex++); SchoolQuery schoolQuery= (SchoolQuery) table.getRowData(); if (schoolQuery == null) return null; //check only the selected entries if(!schoolQuery.isSelected()) continue;