// Not matching
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
}
-
- // Get client id (aka form id)
- String clientId = component.getClientId();
-
- // Is the email address already registered?
- if ((!clientId.endsWith("resendEmailAddress")) && (this.contactBean.isEmailAddressRegistered(emailAddress))) { //NOI18N
- // Generate message
- String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N
-
- // No, then abort here
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
- } else if ((clientId.endsWith("resendEmailAddress")) && (!this.contactBean.isEmailAddressRegistered(emailAddress))) { //NOI18N
- // Generate message
- String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N
-
- // No, then abort here
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
- }
-
- // Trace message
- //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N
}
}