2 Replies Latest reply on Jun 30, 2009 7:14 AM by ilya_shaikovsky

    ScrollableDataTable: Scroll position on rerendering incorrec

    aganesan

      I have a scrollable data table where in i expand and collapse elements and try to re render the table everytime an element is expanded or collapsed.

      Issue: The scroll position comes back to the top when i rerender the grid.

      Richfaces : 3.3.1 GA
      OS : WIN XP/linux
      Server JBOSS 4.3 EAP
      JAVA 1.5

      <rich:scrollableDataTable
      frozenColCount="#{familyController.view.frozenColCount}"
      height="200px"
      width="1200px"
      id="grid"
      rows="500"
      value="#{familyController.view.rows}"
      var="row"
      headerClass ="richDataTableHeaderFont"
      rowKeyVar="rowKey"
      >
      <%-- Constructing columns dyanamically --%>

      <rich:columns value="#{familyController.view.columns}"
      var="column"
      index="ind">

      <f:facet name="header" >
      <h:outputText value="#{column.name}"
      styleClass="richDataTableHeaderFont"/>
      </f:facet

      <a4j:commandLink id="name" value="#{!row[ind].ref.expanded?'[ + ]':' [ - ]'}" rendered="#{row[ind].ref.expandable}" onclick="expandCollapseColumn(#{rowKey},#{ind})" /><h:outputText id="rowName" value="#{row[ind].value}" />
      </rich:columns>


      </rich:scrollableDataTable>