0 Replies Latest reply on Mar 11, 2008 9:13 AM by vishalharle

    Changing pages in <rich:datascroller> according to <h:select

    vishalharle

      Hi ..


      I`m trying to change the data in <rich:datatable> between 'Monthly' ,'Quarterly' and 'Yearly' with the help of


      [<h:selectOneMenu id="selectSavingType" value="#{simulationController.simulationModel.savingType}" binding="#{simulationController.selectOneMenu}">
      
       <f:selectItem itemValue="Monthly" itemLabel="#{labelBean.labels['monthly']}" />
       <f:selectItem itemValue="Quarterly" itemLabel="#{labelBean.labels['quarterly']}" />
       <f:selectItem itemValue="Yearly" itemLabel="#{labelBean.labels['yearly']}" />
       <a4j:support event="onchange" reRender="savingDataTable,savingDataScroller"
       action="#{simulationController.actionSelectSavingData}" >
       </a4j:support>
       </h:selectOneMenu>]




      Now,the data in datatable is getting changed and also datascroller showing the pages and data in each page correctly but when I change the itemValue from 'Monthly' to 'Qurterly' or 'Yearly',the data in datatable changes but number of pages which datascroller was showing earlier doesn`t change accordingly as there are different number of pages in for each itemLabel.It chages only when I click on scrollertable.
      Please suggest.....

      Here is the datatable and datascroller I`m using...

      <rich:datascroller align="center" for="savingDataTable" maxPages="10" tableStyleClass="scrollerTable" id="savingDataScroller" />
      
      
       <rich:dataTable align="center" width="620" id="savingDataTable" rows="15" columnClasses="savingsCol" rowClasses="table_Row" headerClass="boldFont"
       value="#{simulationController.savingTypeData}" var="savingData">


      So the problem is about changing the number of pages inside datascroller on changing itemValue in <h:selectOneMenu>

      Thanks for help!