]> git.mxchange.org Git - pizzaservice-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>
Tue, 12 Sep 2017 23:04:29 +0000 (01:04 +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/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java
web/WEB-INF/faces-config.xml
web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl

index 41c284b0da3837a51d7cede75801a63e4611d964..a6edb3513f31411632ffc4e76e276da081878111 100644 (file)
@@ -65,6 +65,7 @@ public class PizzaEmailAddressValidator 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 PizzaEmailAddressValidator 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 PizzaEmailAddressValidator 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 a6a7f3f50114d6750edf015bc672df104aca5012..de07c8140ca4c5897330493109fea7691723da79 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>