I have the following setup:
Code: Select all
<p:outputPanel id="serviceupdate">
<p:dataTable id="servicetable" width="800" style="min-width:800px;width:800px;" var="item" value="#{customerAdministration.serviceList}"
paginator="true" rows="10" dynamic="true">
<p:column width="100">
<f:facet name="header">
<h:outputText value="#{sessionBean.text['active']}" />
</f:facet>
<h:outputText value="#{item.active}" />
</p:column>
...
<p:column width="160">
<f:facet name="header">
<h:outputText value="#{sessionBean.text['action']}" />
</f:facet>
<p:commandButton immediate="true" rendered="#{not item.active}" value="#{sessionBean.text['activate']}" action="#{customerAdministration.activate(item.service.id)}" update="serviceupdate">
</p:commandButton>
<p:commandButton immediate="true" rendered="#{item.active}" value="#{sessionBean.text['deactivate']}" action="#{customerAdministration.deactivate(item.service.id)}" update="@parent">
</p:commandButton>
</p:column>
</p:dataTable>
The dataTable is contained in a p:tab of a p:wizard which sits in the h:form.