Saturday, December 14, 2013

How to update specific cell/component in dataTable

When I tried to update a specific cell or component in dataTable.
<p:commandButton id="btn"
 value="Update DataTable"
 update=":form:dataTable:0:input1" />

Hit the following Exception,
javax.faces.FacesException: Cannot find component with identifier ":form:dataTable:0:input1" referenced from "form:j_idt41:btn"

This error could be solved with jQuery selector.
<p:commandButton id="btn"
    value="Update DataTable"
    update="@(:input[id=form\\:dataTable\\:0\\:input1])" />


No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...