6 Replies Latest reply on Jan 23, 2008 9:30 AM by sergeyhalipov

    How to ReRender table cells with ajax support?

      Hi,

      We have some difficulties need some help.

      In our application, we have a scrollableDataTable which have input and output fields in each row such as, input1, output1, input2, ...

      One of requirement is after user changes the value of input1, using ajax to change values of output1 and input2 for that row.

      <rich:column>
      <f:facet name="header">
      <h:outputText value="Input1"/>
      </f:facet>
      <f:facet name="footer">
      <h:outputText value="#{Controller.totalInput1}"/>
      </f:facet>
      <h:inputText value="#{entry.input1}" >
      <a4j:support actionListener="{Controller.updateEntry}"
      event="onblur" reRender="editTable:rowIndex:output1Index, editTable:rowIndex:input2Index">
      </a4j:support>
      </h:inputText>
      </rich:column>
      <rich:column>
      <f:facet name="header">
      <h:outputText value="Value2"/>
      </f:facet>
      <f:facet name="footer">
      <h:outputText value="#{Controller.totalOutput1}"/>
      </f:facet>
      <h:outputText value="#{entry.output1}" >
      </h:inputText>
      </rich:column>
      <rich:column>
      <f:facet name="header">
      <h:outputText value="Input2"/>
      </f:facet>
      <f:facet name="footer">
      <h:outputText value="#{Controller.totalInput2}"/>
      </f:facet>
      <h:inputText value="#{entry.input1}" >
      </h:inputText>
      </rich:column>

      My problems are
      1)How to find ReRender cell ids? such as editTable:rowIndex:output1Index, editTable:rowIndex:input2Index.
      2)How to detect which row is changed?

      Thanks!

      Rulin