8 Replies Latest reply on Apr 13, 2010 10:02 AM by sai burgula

    dataSrcoller, how to send page number to backing bean

    Daniel Kane Novice


      Trying to bind datascroller page index to backing bean.

      <rich:datascroller for="userTbl" pageIndexVar="pageIndex">
       <a:actionparam name="pIndex" value="#{pageIndex}" assignTo="#{userAdmin.pageIndex}"/>

      Backing component :

      int pageIndex;
       public String getPageIndex()
       return String.valueOf(pageIndex);
       public void setPageIndex(String p)
       log.info("Page index set to "+p,null);
       catch(Exception ex)
       this.pageIndex=1 ;

      When I switch pages, the log message is always "Page index set to null".
      Tried to access pageIndex as integer not string, the result was "must be a number".

      What is the correct way to get page index ?