Reputation: 177
We are working on a project with JSF and PrimeFaces and we are looking to add dynamic inline validation on our forms. I'm not sure if PrimeFaces can handle this (correct me if I am wrong) so I am looking for some alternatives
Does anyone know of any plugins we could use to do this? Prefer something that incorporates JSF too...
I'm not a developer but a UX guy so sorry if some of the terminology is incorrect.
Upvotes: 0
Views: 491
Reputation: 1108722
Standard JSF supports server side validation by ajax (live example here) and PrimeFaces definitely also supports it (live example here). You can add <f:ajax event="blur" render="message_id" />
inside input components to perform validation directly on blur (see also this tutorial).
<h:inputText id="foo" value="#{bean.foo}" required="true">
<f:ajax event="blur" render="foo_message" />
</h:inputText>
<h:message id="foo_message" for="foo" />
Upvotes: 1