3
I defined the field nome
using p:inputText
to receive values, it is a field obligatory. How do I display a message showing that this field is required, using p:messages
? I am also using JSF.
Follows my HTML:
<h:form>
<p:messages/>
<p:panelGrid columns="2">
<f:facet name="header">
Cadastro de Pessoas
</f:facet>
<h:outputLabel value="Nome" for="nome"/>
<p:inputText id="nome" required="true"/>
<f:facet name="footer">
<p:commandButton value="Cadastrar" icon="ui-icon-disk"
iconPos="right"/>
</f:facet>
</p:panelGrid>
</h:form>
Follow the image of the Form:
No, unfortunately it didn’t work.
– Richard Franklin
What happened after the changes? Failed or did not change anything in the flow?
– Weslley Tavares