PrimeFaces partial input validation

PrimeFaces provides a very nice and easy way to do partial input validation of forms.

<h:form>
    <p:inputText value="#{bean.name}" id="name">
        <p:ajax event="blur" process="@this" update="nameMsg" />
    <p:message for="name" id="nameMsg"/>
</h:form>

The validation constraints can either be defined the classic JSF-way (not recommended) or using JSR303 Bean Validation Annotations.
But keep in mind if you have any cross-validation, this could lead to failed validations, as there is only the one inputText processed.

About these ads
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to PrimeFaces partial input validation

  1. I m doing validation in dropdown and calender like that but it can’t working properly……………. i need help

    <!– –>

    and

    <!– –>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s