Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

primefaces custom validate


@FacesValidator("fooValidator")
public class FooValidator implements Validator {

    @Override
    public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
        // ...

        if (valueIsInvalid) {
            throw new ValidatorException(new FacesMessage("Value is invalid!"));
        }
    }

}

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #primefaces #custom #validate
ADD COMMENT
Topic
Name
2+2 =