Guest User

Untitled

a guest
May 2nd, 2012
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. How to check a textbox value when the user press tab
  2. @FacesValidator("input1Validator")
  3. public class Input1Validator implements Validator {
  4.  
  5. @Override
  6. public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
  7. if (isInvalid(value)) {
  8. throw new ValidatorException(new FacesMessage("Invalid field!"));
  9. }
  10. }
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment