3 Replies Latest reply on Dec 4, 2013 3:56 PM by bleathem

    DataScroller not working when inside a <a4j:repeat> tag?

    peter.falken

      I'm using a code similar to this and it works:

       

      <rich:tabPanel>
      <a4j:repeat value="#{Vars}" var="var">
             <rich:tab header="#{var}" switchType="ajax">
                  <rich:dataTable value="#{foo(var)}" var="f" rows="10" rowKeyVar="rowNum">
                       <f:facet name="header">
                          <rich:dataScroller boundaryControls="hide" fastControls="hide" />
                       </f:facet>
                       <rich:column>
                            <f:facet name="header">#</f:facet>
                            <h:outputText value="#{rowNum+1}." />
                       </rich:column>
                </rich:dataTable>
        </rich:tab>
      </a4j:repeat>
      </rich:tabPanel>
      

      But if I switch it a little and put the DataScroller outside the DataTable and use the "for" attribute it doesn't work.

      Can anybody help me out? - maybe I'm doing something wrong.

       

      <rich:tabPanel>
      <a4j:repeat value="#{Vars}" var="var">
             <rich:tab header="#{var.name}" switchType="ajax">
                     <rich:dataScroller boundaryControls="hide" fastControls="hide" for="#{var.name}_table" />
                  <rich:dataTable id="#{var.name}_table"  value="#{foo(var)}" var="f" rows="10" rowKeyVar="rowNum">
                       <rich:column>
                            <f:facet name="header">#</f:facet>
                            <h:outputText value="#{rowNum+1}." />
                       </rich:column>
                </rich:dataTable>
        </rich:tab>
      </a4j:repeat>
      </rich:tabPanel>