3 Replies Latest reply on Nov 4, 2010 8:11 AM by Ilya Shaikovsky

    no sort event functionality in rich:dataTable?

    thonis meta Newbie

      dear community,

      we use a rich:dataTable with sortable columns:

      <rich:column selfSorted="true" sortBy="#{entity.name}" ....>


      we also have a rich:datascroller for paging.

      now i want to set the datascroller to the first page if the user changes the sorting, but i did not find a simple way to do this.
      there is no sortListener or sth like that, is it?

      the only way i can think of to do this now is to bind the sortOrder attributes of the columns to a component attribute, so i can detect a change of the sort order.
      if a change is detected, i have to set the datascroller page to 1, and add the datascroller manually to the ajaxContext.renderedAreas.

      is there a better way?

      ThanksInAdvance, thonis!