Ajax Framework - Validation

Validations are executed on the server side and page is updated with the result.

Documentation
New User
<h:form>
    <p:panel id="panel" header="New User">

        <p:messages id="msgs" />

        <h:panelGrid columns="3" cellpadding="5">
            <p:outputLabel for="firstname" value="Firstname:" />
            <p:inputText id="firstname" value="#{userView.firstname}" required="true" label="Firstname">
                <f:validateLength minimum="2" />
            </p:inputText>
            <p:message for="firstname" display="icon" />

            <p:outputLabel for="lastname" value="Lastname:" />
            <p:inputText id="lastname" value="#{userView.lastname}" label="Lastname" required="true">
                <f:validateLength minimum="2" />
                <p:ajax update="msgLastname" event="keyup" />
            </p:inputText>
            <p:message for="lastname" id="msgLastname" display="icon" />

        </h:panelGrid>

        <p:commandButton value="Save" update="panel" action="#{userView.save}" icon="pi pi-check" />
    </p:panel>
</h:form>

FREE THEMES

Built-in component themes created by the PrimeFaces Theme Designer.

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.