0 Replies Latest reply on Apr 16, 2013 1:15 PM by Matthew Fischer

    a4j:repeat getRowIndex = -1 last component when a4j:region is used

    Matthew Fischer Newbie



      what I find when I use a4j:repeat;


      Without the <a4j:region>tags shown in bold and strikethrough, the backing bean action (UIRepeat) repeater.getRowIndex() succeeds.  But with the <a4j:region> tags included, the backing bean action repeater.getRowIndex() returns -1 until the page is refreshed.


      Anyone have any thoughts.  BTW...replacing <a4j:repeat> with <t:datalist layout="simple">- and changing nothing else - works flawlessly.  BTW #2 - I have the region b/c I want to display the <a4j:status ...> for each repeated element, not the entire page.


      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>


      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>


      <!DOCTYPE html>
         <t:htmlTag value="title">
          <t:outputText value="Richfaces a4j:repeat Test" />


         <a4j:repeat var="rows" value="#{lightboxBean.repeatData}" rows="5"
          rowKeyVar="index" binding="#{lightboxBean.repeater}" id="rtest">




            <a4j:commandLink action="#{lightboxBean.showIndex}" rel="tooltip">
             <t:outputText value="#{index} :: #{rows}" />



            <f:facet name="start">
             <t:graphicImage url="#{bundle.imagePath}loading.gif" border="0"
              style="margin-left: 7px;" alt="loading" />
            <f:facet name="stop"></f:facet>