0 Replies Latest reply on Mar 5, 2008 4:14 PM by Sheldon s

    part of jsf tree within <a4j:output/> does not re render

    Sheldon s Newbie

      I have a page with an Ajax pagination control. What it does is that when you click the page link (<a:commandLink/>), the page links and the page content are updated:

      
      <a:outputPanel id="reviewList" rendered="true">
       <a:region>
       <c:if test="#{fn:length(allReviews) > reviewPageSize}">
       <table>
       <tr>
       <td><b>Page:</b>
       <c:forEach begin="0" end="#{(fn:length(allReviews)-1)/reviewPageSize}" varStatus="rowStatus">
      
       <h:outputText value="#{rowStatus.index + 1}" rendered="#{reviewPagination.startReviewIndex == rowStatus.index * reviewPageSize}"/>
       <a:commandLink action="#{neighborView.paginateReview}" reRender="reviewList" rendered="#{reviewPagination.startReviewIndex != rowStatus.index * reviewPageSize}">#{rowStatus.index + 1}
       <f:param name="reviewPage" value="#{rowStatus.index}"/>
       <f:param name="ajax" value="true"/>
       </a:commandLink>
       </c:forEach>
       </td>
       </tr>
       </table>
       </c:if>
      <!-- here is page content -->
       <c:forEach begin="#{reviewPagination.startReviewIndex}" end="#{reviewPagination.endReviewIndex}" items="#{allReviews}" var="review">
       <a:include viewId="WEB-INF/layout/review_template.xhtml" ajaxRendered="true">
       <ui:param name="review" value="#{review}"/>
       </a:include>
       </c:forEach>
       </a:region>
      </a:outputPanel>
      


      Inside review_template.xhtml I use <h:outputText/> to print out some of reviews's attributes. My trouble is that only part of each review gets updated when I click page link <a:commandLink/>, the part of review that uses <h:outputText/> to print out does not get updated and remain the value on the old page. Got any ideas why this happens?

      Thanks.