1 Reply Latest reply on Sep 25, 2008 5:32 AM by cash1981

    <rich:datascroller ajaxSingle=

    e.morozov

      I have the following code in .jspx:

      <rich:dataTable value="#{bORequestOrderPositionsPanelBB.positions}"
       rows="5" var="position" id="boRequestOrderPositionsList"
       binding="#{bORequestOrderPositionsPanelBBView.dataTable}"
       rowKeyVar="keyVar">
      <rich:column>
       <h:outputText value="#{position.spareCardReadDto.productCode}"/>
      
      </rich:column>
      
      <a4j:support event="onRowClick"
       />
      
      <f:facet name="footer">
       <rich:datascroller for="boRequestOrderPositionsList"
       ajaxSingle="false"
       id="itemsFooterId"
       />
      
      </f:facet>
      
      </rich:dataTable>


      If you click on some row in grid (for example 1 page), than click another page (for example 2), grid will display previous page (1 page in our example) and datascroller will have page = 2.

      If you remove
      <a4j:support event="onRowClick"
       />

      or remove in datascroller
      ajaxSingle="false"

      then everything in above usecase will work fine.

      But I shoud use <a4j:support> to call server method and ajaxSingle="false" in datascroller to achieve required behaviour.

      Is this bug in components?? Or how to call server method on event "onRowClick" when you use ajaxSingle="false" in dataScroller??

      Thanks in advance.

        • 1. Re: <rich:datascroller ajaxSingle=
          cash1981

          Sorry, but your english is poor so I didn't understand what your question is.

          But for the datascroller to work, you need first of all to have a session bean or use a4j:keepAlive for the bean.

          You can just have the datascroller right after the dataTable and you dont need a4j:support. Try this code

          <h:form>
          <rich:dataTable value="#{bORequestOrderPositionsPanelBB.positions}"
           rows="5" var="position" id="boRequestOrderPositionsList"
           binding="#{bORequestOrderPositionsPanelBBView.dataTable}"
           rowKeyVar="keyVar">
          <f:facet name="header"><h:outputText value="Product Code"/></f:facet>
          <rich:column>
           <h:outputText value="#{position.spareCardReadDto.productCode}"/>
          </rich:column>
          
          </rich:dataTable>
          <rich:datascroller align="left" for="boRequestOrderPositionsList" renderIfSinglePage="false" maxPages="20" />
           </h:form>
          


          For testing purposes you can put renderIfSinglePage to true