7 Replies Latest reply on Jul 3, 2008 5:07 PM by Sanjeev Koppal

    a4j:repeat and dataScroller

    Sanjeev Koppal Newbie

      How can i use dataScroller for pagination purpose while using a4j:repeat.
      It seems like i can see the number of pages, but i cannot scroll or go to next page...
      I tried using richTable and subTable it works great...
      The only reason i am using a4j:repeat coz i need the subtable to expand and collapse, which i couldn't achieve with RichTable and Subtable...
      Please let me know if i can use dataScroller for a4j:repeat?

      <tr>
      <th colspan="6">
       <rich:datascroller align="center" for="jobList" maxPages="4"
       page="#{dataTableScrollerBean.scrollerPage}" />
      </th>
      </tr>
      <a4j:repeat id="jobList" var="job" value="#{viewJobBean.jobs}" rows="2">
      <tr>
      <a4j:region >
       <td>
       <img id="_img_${job.nodeNid}" src="../images/arrow_right.gif"
       style="border: 0; cursor: hand"
       onclick="hideImg('_img_${job.nodeNid}'),showImg('_img_1_${job.nodeNid}'),showDiv('jobversions_${job.nodeNid}')" />
       <img id="_img_1_${job.nodeNid}"
       src="../images/arrow_down.gif" style="display: none"
       border="0"
       onclick="showImg('_img_${job.nodeNid}'),hideImg('_img_1_${job.nodeNid}'),hideDiv('jobversions_${job.nodeNid}')" />
       </td>
       <td>
       <h:commandLink id="_${loggedInUserBean.randomId}" value="#{job.nodeNid}" action="#{viewJobBean.viewJobDetail}">
       <f:param id="_${loggedInUserBean.randomId}" name="jobId" value="#{job.nodeNid}" />
       </h:commandLink>
       </td>
       <td>
       <rich:inplaceInput showControls="true" immediate="true" editEvent="ondblclick"
       maxInputWidth="200" minInputWidth="1" required="true"
       converterMessage="Job Name should have atleast one character"
       requiredMessage="Job Name should have atleast one character. Value can't be changed."
       selectOnEdit="true" inputWidth="200px" defaultLabel="#{job.displayJobNameStart}" value="#{job.displayJobNameStart}">
       <a4j:actionparam actionListener="viewJobBean.editJobDetails" name="jobId" value="#{job.nodeNid}" assignTo="#{viewJobBean.nodeNid}"/>
       <a4j:actionparam name="jobName" value="#{job.displayJobNameStart}" assignTo="#{viewJobBean.selectedJob}"/>
       <f:param name="jobId" value="#{job.nodeNid}"/>
       <a4j:support actionListener="#{viewJobBean.editJobDetails}" event="oneditactivated" ajaxSingle="true"/>
       </rich:inplaceInput>
      
       <a4j:status id="_#{loggedInUserBean.randomId}">
       <f:facet name="start">
       <h:graphicImage id="_#{loggedInUserBean.randomId}" value="/images/rotating_arrow.gif"/>
       </f:facet>
       </a4j:status>
      
       </td>
      </a4j:region>
      
       </tr>
      
       <tr>
       <td colspan="7">
       <div class="subliner" id="jobversions_${job.nodeNid}" style="display: none; margin-left: 5px; float: none; overflow: auto; height: 200px;">
       <table class="sResultsver">
      
       <a4j:repeat value="#{job.versions}" var="job1">
      
       <tr>
       <td style="width: 70px;">
       <h:commandLink id="_${loggedInUserBean.randomId}"
       value="#{job1.nodeVersionFrnNodeNid}"
       action="#{viewJobBean.viewJobDetail}">
       <f:param id="_${loggedInUserBean.randomId}"
       name="jobIdVersion"
       value="#{job1.nodeVersionFrnNodeNid}" />
       </h:commandLink>
       </td>
       <td>
       <h:commandLink id="_${loggedInUserBean.randomId}"
       action="#{viewJobBean.viewJobDetail}"
       title="#{job1.nodeVersionDescription}">
       <h:outputText id="_#{loggedInUserBean.randomId}"
       escape="false"
       value="Revision (#{job1.nodeVersionNumber}) Approved on [ #{job1.nodeVersionApprovedDttm} ]" />
       <f:param id="_${loggedInUserBean.randomId}"
       name="jobIdVersion"
       value="#{job1.nodeVersionFrnNodeNid}" />
       </h:commandLink>
       </td>
       </tr>
       </a4j:repeat>
       </table>
       </div>
       </td>
       </tr>
      
      </a4j:repeat>