@Override
public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+ System.out.println(this.getClass().getSimpleName() + ".validate(): component.clientId=" + component.getClientId());
// The required field
String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N
if (component.getAttributes().containsKey("allowEmptyValue")) { //NOI18N
// Get attribute
Object attribute = component.getAttributes().get("allowEmptyValue"); //NOI18N
+ System.out.println(this.getClass().getSimpleName() + ".validate():attribute=" + attribute);
// Make sure, it is Boolean as no String is accepted anymore
if (!(attribute instanceof String)) {
// Securely cast it
allowEmptyValue = Boolean.parseBoolean((String) attribute);
}
+ System.out.println(this.getClass().getSimpleName() + ".validate(): allowEmptyValue=" + allowEmptyValue);
// Pre-validation (example: not null, not a string, empty string ...)
super.preValidate(context, component, value, requiredFields, allowEmptyValue);
</navigation-rule>
<navigation-rule>
<from-view-id>/guest/user/user_resend_link.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>user_login</from-outcome>
- <to-view-id>/login/login_index.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>login_edit_user_data</from-outcome>
- <to-view-id>/user/login_edit_user_data.xhtml</to-view-id>
- </navigation-case>
<navigation-case>
<from-outcome>user_profile</from-outcome>
<to-view-id>/guest/user/user_profile.xhtml</to-view-id>
</div>
<div class="table-right-medium">
- <h:inputText styleClass="input" id="emailAddress" size="10" maxlength="255" value="#{adminContactController.emailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
- <f:validator validatorId="EmailAddressValidator" />
- <f:attribute name="allowEmptyValue" value="#{allowEmptyRequiredData}" rendered="#{not empty allowEmptyRequiredData}" />
+ <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{adminContactController.emailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
+ <f:validator for="emailAddress" validatorId="EmailAddressValidator" />
+ <f:attribute name="allowEmptyValue" value="#{allowEmptyRequiredData}" />
</h:inputText>
</div>
</h:panelGroup>