1

I am working with JSF 2.2 and Primefaces 6.0. I have a p:dataTable with different p:columns, and each column has many rows. I would like that, whenever column1 input changes, column2 input, in the same row, updates, however, it is not working; it doesn't render.

This is my xhtml code:

<p:dataTable value="#{myBean.objectsList}" var="object">
  <p:column headerText="column1">
    <table>
      <tbody>
        <ui:repeat value="#{object.subObjects}" var="object2">
          <tr>
            <td>
              <c:set var="object3" value="#{object2.subObjects}"/>
              <h:inputText id="value1#{myBean.toString(object3)}" value="#{object3.value1}">
                <f:ajax event="change" listener="#{myBean.doSomething}"
                        execute="@this" render="@this"/>
              </h:inputText>
            </td>
          </tr>
        </ui:repeat>
      </tbody>
    </table>
  </p:column>
  <p:column headerText="column2">
    <table>
      <tbody>
        <ui:repeat value="#{object.subObjects}" var="object2">
          <tr>
            <td>
              <c:set var="object3" value="#{object2.subObjects}"/>
              <h:inputText value="#{object3.value2}" disabled="disabled">
                <f:ajax event="change" listener="#{myBean.doSomething2}"
                        execute="@this" render="value1#{myBean.toString(object3)}"/>
              </h:inputText>
            </td>
          </tr>
        </ui:repeat>
      </tbody>
    </table>
  </p:column>
</p:dataTable>

Each object has many objects as a List.

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
Juan Camacho
  • 736
  • 2
  • 7
  • 15
  • 4
    two upvotes in 9 views for this question? Do you have co-workers that upvoted it? – Kukeltje Nov 16 '16 at 06:43
  • Related (or even duplicate): [How to update a specific cell on a PrimeFaces dataTable](https://stackoverflow.com/questions/35990292/how-to-update-a-specific-cell-on-a-primefaces-datatable) – Jasper de Vries Nov 16 '16 at 10:49

1 Answers1

0

In f:ajax tag of the first column (column1), you have given @this as value for the attribute render. Instead, please try giving id of the component column2 or id of the p:dataTableitself.

amFroz
  • 95
  • 1
  • 12