jsf - Class Level Validation in Seam/Hibernate -
i implemented custom class level validator in seam/hibernate application. on form have <s:validateall>
. tag not call class level validation.
related issue: https://jira.jboss.org/browse/jbseam-1878
what best way me call validation using seam/jsf/richfaces?
have used validator
attribute? have use either s:validateall
or s:validate
this maybe not mean hibernate class level validation, @ least work
for instance:
<h:inputtext value="#{foo.bar}" validator="#{validator.checkfoo}" required="true"> <s:validate/> </h:inputtext>
and validator
@name("validator") @scope(scopetype.event) @bypassinterceptors public class validator { public void checkfoo(facescontext context, uicomponent tovalidate, object value) { //do check , if incorrect set value ((uiinput) tovalidate).setvalid(false); } }
Comments
Post a Comment