2 Replies Latest reply on Mar 24, 2009 3:45 AM by tk1

    datascroller - page attribute value-binding

      Hallo!

      I have a problem on how to use the "page" attribute value-binding of the rich:datascroller component correctly. Suggest having the following page page snippet:

      <h:form>
       <a4j:outputPanel>
       <rich:dataTable
       id="table"
       value="#{dataModel}"
       var="data"
       first="0"
       rows="1">
       <h:column>
       <h:outputText value="#{data}" />
       </h:column>
      
       <f:facet name="footer">
       <h:panelGrid columns="4">
      
       <rich:datascroller
       id="scroller"
       for="table"
       maxPages="10"
       page="#{scrollerBean.currentPage}" />
      
       <h:outputLabel for="in" value="Page: " />
      
       <h:inputText id="in"
       value="{scrollerBean.currentPage}"
       required="false">
      
       <a4j:support event="onkeyup"
       requestDelay="1000"
       reRender="table" />
      
       </h:inputText>
      
       <rich:message for="in" />
      
       </h:panelGrid>
       </f:facet>
       </rich:dataTable>
       </a4j:outputPanel>
      </h:form>
      


      Page switching by manual input works fine in this snippet. If you enter a valid page number, the page gets displayed. If you enter a page number greater than maximum available number of pages, the last diplayable page is selected by the datascroller:

      WARN [UIDatascroller] Datascroller j_id48:table:scroller: The requested page #3 isn't found in the model containing 2 pages. Paging is reset to page #2
      


      But now it's getting weired: You can enter a valid page, but the current page won't switch. What is the problem here?

      Any suggestions?

      Richfaces verision: 3.3.0.GA

      Thanks in advance,
      - Thomas