3 Replies Latest reply on May 28, 2009 5:51 PM by nbelaevski

    how to reRender certain row of dataTable/dataList

    javatwo

      <t:dataList id="areaList" var="area" value="#{bean.areaList}">

      <t:div id="area">
      <t:dataList var="city" value="#{area.cityList}>
      .....
      </t:dataList
      </t:div>

      </t:dataList>

      <a4j:commandLink action="#{bean.refresh4thRow" reRender="3:area" />

      With the code above, I hope to achieve:
      when clicking the link, the 4th row will be refreshed.

      But on server side it says: component id "3:area" not found.
      If I change reRender to "areaList:3:area", I got the same error.
      If I change reRender to ":areaList:3:area", no error, but nothing happened, 4th row was not refreshed.

      I am using RichFaces 3.3.0, JBoss 5.0.1GA, Tomahawk 1.1.8. IE7.

      How to refresh certain row of dataTable/dataList using a4j? Thanks for help.
      Dave

        • 1. Re: how to reRender certain row of dataTable/dataList
          ilya_shaikovsky

          check our a4j:repeat sample at demosite.

          And this could not be achieved with tomahawk components. You should use our iteration components to use particular cells update feature.

          • 2. Re: how to reRender certain row of dataTable/dataList
            pjc

            Please eloborate with more detailed explanation.

            I am trying to update a single row in a list by using a combination of a4j:repeat and a4j:poll. But it seems as if each row is updated after each ajax response from the poll. Even though the value of ajaxKeys is a subset of all the items in the list.



            <a4j:poll interval="2500" reRender="testSteps" />

            <a4j:form>
            <a4j:outputPanel id="testSteps">
            <h:outputText>
            <a4j:repeat var="childJobInfo" value="#{jobStatusBean.allSteps}" rowKeyVar="rowKey" ajaxKeys="#{jobStatusBean.ajaxKeys}">
            <h:outputText>
            child: #{childJobInfo.jobNumber}, rowKey: #{rowKey.class}, random: #{childJobInfo.random}

            </h:outputText>
            </a4j:repeat>
            </h:outputText>
            </a4j:outputPanel>
            </a4j:form>

            • 3. Re: how to reRender certain row of dataTable/dataList
              nbelaevski

              Hi,

              That's because you are re-rendering "testSteps" component, wrap your text into a4j:outputPanel and point reRender to it.