]> git.mxchange.org Git - addressbook-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 1 Sep 2017 22:06:40 +0000 (00:06 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 9 Sep 2017 19:21:08 +0000 (21:21 +0200)
- added wrong navigation rules, ops
- added noisy debug lines, somehow f:attribute is not ending up in validator
- removed rendered attribute from same JSF tag

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/addressbook/validator/emailaddress/AddressbookEmailAddressValidator.java
web/WEB-INF/faces-config.xml
web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl

index d5d2b452c489f1933ea6d550ae7d3007c9884d4b..a321f5880c297377258cbfa52589d9f525bfe131 100644 (file)
@@ -65,6 +65,7 @@ public class AddressbookEmailAddressValidator extends BaseStringValidator {
 
        @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
 
@@ -75,6 +76,7 @@ public class AddressbookEmailAddressValidator extends BaseStringValidator {
                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)) {
@@ -85,6 +87,7 @@ public class AddressbookEmailAddressValidator extends BaseStringValidator {
                        // 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);
index 53b166c9f11a0dd17b6db3a760e2cbe4ffd8e5ed..ae5c79d3cf812bb8930768b8cab03e2b7231af48 100644 (file)
        </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>
index 3ec8a69c8ccac408d5af1ebc4cb126630408992b..69267472510da1b2b3b42dad8608a97fbaa023b6 100644 (file)
                                </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>