]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Injection is not working in converters/validators as JavaEE is not so super-flexible ...
authorRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 08:45:37 +0000 (10:45 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 08:56:17 +0000 (10:56 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/validator/password/FinancialsUserPasswordValidator.java

index 21af6705ae64378697589b5a75650325e16ffbc9..eb1a012c4a6d167b2f89bf900df8ca4df050f423 100644 (file)
  */
 package org.mxchange.jfinancials.validator.password;
 
-import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.validator.FacesValidator;
 import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
-import javax.inject.Inject;
 import org.mxchange.jcoreee.validator.string.BaseStringValidator;
-import org.mxchange.jfinancials.beans.login.FinancialsUserLoginWebSessionController;
-import org.mxchange.jusercore.container.login.LoginContainer;
-import org.mxchange.jusercore.container.login.UserLoginContainer;
-import org.mxchange.jusercore.model.user.UserUtils;
 
 /**
  * A validator for validating passwords (if they match with stored)
@@ -42,12 +36,6 @@ public class FinancialsUserPasswordValidator extends BaseStringValidator impleme
         */
        private static final long serialVersionUID = 48_581_795_687_317L;
 
-       /**
-        * User login controller
-        */
-       @Inject
-       private FinancialsUserLoginWebSessionController userLoginController;
-
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
                // Trace message
@@ -59,6 +47,8 @@ public class FinancialsUserPasswordValidator extends BaseStringValidator impleme
                // Pre-validation (example: not null, not a string, empty string ...)
                super.preValidate(context, component, value, requiredFields, false);
 
+               /*
+                * @TODO injection is not working in converters. No, JavaEE is not so super-flexible.
                // value is known to be an entered password, so instance login container
                LoginContainer container = new UserLoginContainer(this.userLoginController.getLoggedInUser(), (String) value);
 
@@ -67,6 +57,7 @@ public class FinancialsUserPasswordValidator extends BaseStringValidator impleme
                        // Password mismatches
                        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Password mismatching.", "The password the user has entered does not match the stored password.")); //NOI18N
                }
+                */
 
                // Trace message
                //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N