1 Reply Latest reply on Mar 4, 2011 3:35 AM by kemal taskiran

    extendeddatatable sort problem

    kemal taskiran Newbie

      Hi,

       

      I am using extended data table, and to sort column I am calling doSort method, however when I am doing it doSort method called for rowsize +1 times, our code is below,

       

      Regards,

       

      Kemal   

       

        <rich:extendedDataTable value="#{userBean.users}"

                  style="width:100%;height:500px;" var="user" id="userTable"

                  rows="#{userBean.pageSize}" selection="#{userBean.selection}" selectionMode="single">

                  <a4j:ajax execute="@form" event="selectionchange"

                      listener="#{userBean.selectionListener}" render=":rightPanel" immediate="true"/>

       

                  <rich:column width="10%" sortBy="#{user.name}" sortOrder="#{user.sortOrder}">

                      <f:facet name="header">

                              <a4j:commandLink value="Name" actionListener="#{userBean.doSort}" render="userTable"/>

                          </f:facet>

                      <a4j:commandLink value="#{user.name}"

                          actionListener="#{userBean.selectUser}" render=":rightPanel">

                          <f:param name="user" value="#{user.id}"></f:param>

                      </a4j:commandLink>

                  </rich:column>

       

          public void doSort(ActionEvent event) {

              if (sortOrder.equals(SortOrder.ascending)) {

                  setSortOrder(SortOrder.descending);

              }

              else {

                  setSortOrder(SortOrder.ascending);

              }

          }