I have a question about the attribute "update" of components PrimeFaces.
In the examples I saw, when I run some action and send them to update it, always pass the id of a component to upgrade. Example:
Code: Select all
<h:inputText value="#{mbPessoa.nome}"/>
<p:commandButton action="#{mbPessoa.mostrarNome}"
update="opnMostrar"/>
<p:outputPanel id="opnMostrar">
<h:outputLabel value="#{mbPessoa.nome}"/>
</p:outputPanel>
So far so good, everything works normally.
But I caught a case where I have a "SubViewer" with id before "outPutPanel. Example:
Code: Select all
<f:subview id="sbvPessoa">
<h:inputText value="#{mbPessoa.nome}"/>
<p:commandButton action="#{mbPessoa.mostrarNome}"
update="sbvPessoa:opnMostrar"/>
<p:outputPanel id="opnMostrar">
<h:outputLabel value="#{mbPessoa.nome}"/>
</p:outputPanel>
</f:subview>
Now, you put the ID of the parent in this case or just put the ID of the component in question
Thanks.
Mojarra 2.0.2, JSF 2.0, Facelets, Glassfish V3.01, Primefaces 2.1.RC1, NetBeans 6.9.