]> git.mxchange.org Git - jfinancials-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>
Fri, 1 Sep 2017 22:06:40 +0000 (00:06 +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/jfinancials/validator/emailaddress/FinancialsEmailAddressValidator.java
web/WEB-INF/faces-config.xml
web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl

index 92ff97c6c77bbb990447b863fd1d1317aafac257..e65c45165c8f2acc3920ed8c4d0dd80d56804522 100644 (file)
@@ -65,6 +65,7 @@ public class FinancialsEmailAddressValidator 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 FinancialsEmailAddressValidator 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 FinancialsEmailAddressValidator 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 b2bab34b0ad033ffa8269eacf9370092a135d462..de8248d5744f77e8b2ffcbc1d66a0da2463a5ef8 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>