0 Replies Latest reply on Nov 23, 2009 9:09 AM by mmattersdorfer

    ScrollableDataTable and Sorting Information

      Hello,

      I've got a problem with the scrollabledatatable.
      I need the sorting information, but the table will not rerender anything when clicking on a column header.
      I've built the following example:

       <h:form>
       <rich:scrollableDataTable id="myTable" binding="#{tableBean.scrollableTable}"
       value="#{tableBean.data}" var="myTableData" frozenColCount="1"
       height="240px" width="100%" sortMode="multi" requestDelay="700"
       rows="#{tableBean.numberOfRows}" selection="#{tableBean.selection}"
       activeClass="rich-table-row-active" selectedClass="rich-table-row-active"
       rowClasses="rich-sdt-row,rich-sdt-row-alter" reRender="clearsorting,sortingResult">
      
       <a4j:support action="#{tableBean.takeSelection}" event="onselectionchange"
       requestDelay="700" reRender="detailPanel"/>
      
       <rich:columns value="#{tableBean.tableColumns}" var="column"
       index="ind" id="#{column.property}-#{ind}" visible="#{column.visible}"
       width="#{column.width}" reRender="clearsorting,sortingResult">
      
       <f:facet name="header">
       <h:outputText value="#{column.title}">
       <a4j:support event="onclick" reRender="clearsorting,sortingResult" />
       </h:outputText>
       </f:facet>
       <h:outputText value="#{myTableData[column.property]}" />
       </rich:columns>
       <f:facet name="footer">
       <a4j:commandLink id="clearSorting" value="Clear Sorting (never rendered)" action="#{tableBean.clearSorting}" reRender="myTable" rendered="#{tableBean.sorted}"/>
       </f:facet>
       </rich:scrollableDataTable>
       <a4j:commandLink id="clearSorting2" value="Clear Sorting (always rendered)" action="#{tableBean.clearSorting}" reRender="myTable,sortingResult"/><br/>
       <a4j:commandLink id="getSorting" value="Get Sorting Information" reRender="sortingResult"/><br/>
       <h:outputText id="sortingResult" value="#{tableBean.sortierung}" />
       </h:form>
      


      I'm trying the rerendering in the scrollabledatatable, in the columns and in the header-facet of the table, but the link with id "clearSorting" will never be visible after sorting the table. The "sortingResult" is only shown, when manually clicked on the "getSorting"-Link.

      Can anybody help me with this or has a solution?

      Thanks in advance, Marcus