Code: Select all
<h:panelGroup id="docTreeContainer">
<p:dataTable id="docTree" value="#{DocsBean.docList}" var="v">
<p:column style="width:150px">
<f:facet name="header">Name</f:facet>
<h:outputText value="#{v.docName}" />
</p:column>
<p:column style="width:50px">
<f:facet name="header">Add</f:facet>
<p:selectBooleanCheckbox id="docChecked" value="#{v.docChecked}">
<p:ajax execute="docChecked" render=":#{component.parent.parent.parent.clientId}"/>
</p:selectBooleanCheckbox>
</p:column>
<p:column style="width:150px">
<f:facet name="header">Detail</f:facet>
<p:inputText value="#{v.detail}" />
</p:column>
</p:dataTable>
</h:panelGroup>
I believe this to be useful because I think it's easier/safer to get to the container through parent chain than using ids.