No commandButton
of primefaces
has u ajax
attribute that can be true
or false
. What effect does it have on submission? I'm making a silly example where the user types a name and triggers the button, right after the typed name is displayed. In this case it only works if ajax
is false
, why?
<h:form>
<h:panelGrid columns="3">
<p:outputLabel value="Nome" />
<p:inputText id="nome" value="#{modelo.nome}"/>
<p:outputLabel id="resultado" styleClass="data" rendered="#{!empty modelo.nome}" value="#{modelo.nome}"/>
</h:panelGrid>
<p:commandButton id="su" value="Salvar" update="resultado" ajax="false"/>
</h:form>