2 Replies Latest reply on Jan 24, 2011 4:09 AM by Ilya Sorokoumov

    Rich:scrollableDataTable, selection not working

    Anna-Lena Sundin Newbie

      Hi All,

      I have a rich:scrollableDataTable with two columns and I've implemented single row selection.

      That works fine as long as I click on the column showing data (h:outputText). and then on the a4j:htmlCommandLink.

      But when I click on the a4j:htmlCommandLink only, selection is not working.

      A new page showing data for choosen row is supposed to show, when clicking at the a4j:htmlCommandLink.


      How can I solve this?


      I have MyFaces 1.2.8 and RichFaces 3.3.3.


      Thanks in advance


      My jsp page:

      <rich:scrollableDataTable id="myTable"
                       width="100%" height="610px"
                       var="show" value="#{Bean.showAll}" 
                       binding = "#{Bean.table}"
                       sortMode="single" >
                       <rich:column  width="300px" sortExpression="#{show.name}"  >
                           <f:facet name="header">
                               <h:outputText value="Name" />
                           <h:outputText value="#{show.name} styleClass="xxx" />
                       <rich:column label="Show" width="100px" >
                           <a4j:htmlCommandLink ajaxSingle="true" id="editLink"
                                action="#{NavigationBean.setPage}"   >
                               <h:outputText value="Show" style="text-decoration:underline;" styleClass="xxx" />
                               <f:param name="current" value="/show.jsp" />



      public void setSelection(SimpleSelection selection) {
               this.selection= selection;
               Object temp = null;
               Object row = null;
               Iterator<Object> iterator = getselectionAssignment().getKeys();
               while (iterator.hasNext()){
                    temp = iterator.next();
                       row =table.getRowData();
                       selectedRow = (xxx) table.getRowData();