7 Replies Latest reply on Jun 28, 2008 8:06 AM by Mikhail Vitenkov

    dataScroller:how to go to page on java

    Lotfi Mellouk Master

      hi all,

      Im using dataScroller and I add a selectOneMenu to select a page for dataTable: the function setPage of dataScroller works only on the first call

      <rich:datascroller binding="#{bean.scroller}"
      pageIndexVar="pageIndex" pagesVar="pages" for="table"
      id="scr2" reRender="scr1,table">
      <f:facet name="pages">
      <h:outputText value="#{pageIndex} / #{pages}" />
      </f:facet>
      </rich:datascroller>
      <rich:panel style="border:0;text-align:center;">
      <h:selectOneMenu value="#{bean.page}">
      <f:selectItems value="#{bean.pages}" />
      <a4j:support action="#{bean.goTo}"
      reRender="scr1,table,scr2" event="onchange" ajaxSingle="false"></a4j:support>
      </h:selectOneMenu>
      </rich:panel>


      java code:

      public void goTo(){
      scroller.setPage(getPage());
      }
      


      how to render a selected page?

      regards!