1 Reply Latest reply on Oct 4, 2012 2:39 PM by Mahesh Bonagiri

    How to get the selected row of a filtered extendedDataTable?

    Sandro Brändli Newbie

      In my application (RichFaces 4.1) I have an extendedDataTable, in my backing bean I need to track the selected rows. This works fine as long as the table is not filtered.


      When the table is filtered and I select for instance the first row, I get the rowKey for the first row of the unfiltered table in the backing bean. How can I get the rowData of the selected row when my table is filtered?


      I use the following Code for my table:


      <rich:extendedDataTable id="freie"
      <a4j:ajax execute="@this" event="selectionchange" 
                render="indicatorPanel" />



      UIExtendedDataTable dataTable= (UIExtendedDataTable) event.getComponent();
      Object originalKey= dataTable.getRowKey();
      for (Object selectionKey: _tableSelection) {
          if (dataTable.isRowAvailable()) {
              _tableSelectedEntries.add((Entry) dataTable.getRowData());


      <rich:column sortBy="#{mitarbeiter.vorname}"
       filterExpression="#{fn:containsIgnoreCase(mitarbeiter.vorname, mitarbeiterFilterBean.firstNameFilter)}">


      I think I am doing it the same way as it is done in the showcase (http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=extendedDataTable&sample=exTableSelection&skin=blueSky).