myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r906137 - in /myfaces/extensions/validator/trunk: component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/ core/src/main/java/org/apache/myfaces/extensions/validator/core/ core/src/main/java...
Date Wed, 03 Feb 2010 17:29:15 GMT
Author: gpetracek
Date: Wed Feb  3 17:29:15 2010
New Revision: 906137

URL: http://svn.apache.org/viewvc?rev=906137&view=rev
Log:
EXTVAL-79

Modified:
    myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
    myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java
    myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java

Modified: myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java?rev=906137&r1=906136&r2=906137&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
(original)
+++ myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
Wed Feb  3 17:29:15 2010
@@ -70,6 +70,8 @@
         initTrinidadMetaDataExtractionInterceptor();
 
         initTrinidadClientValidatorStorage();
+
+        initRequiredInitialization();
     }
 
     private void deactivateDefaultExtValRenderKitWrapperFactory()
@@ -144,4 +146,18 @@
         return deactivateTrinidadValidationExceptionInterceptor == null ||
                 !deactivateTrinidadValidationExceptionInterceptor.equalsIgnoreCase("true");
     }
+
+    private void initRequiredInitialization()
+    {
+        if(!isRequiredInitializationDeactivated())
+        {
+            ExtValContext.getContext().addGlobalProperty("init:required", Boolean.TRUE, false);
+        }
+    }
+
+    private boolean isRequiredInitializationDeactivated()
+    {
+        return "false".equalsIgnoreCase(
+                org.apache.myfaces.extensions.validator.core.WebXmlParameter.ACTIVATE_REQUIRED_INITIALIZATION);
+    }
 }

Modified: myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java?rev=906137&r1=906136&r2=906137&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java
(original)
+++ myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java
Wed Feb  3 17:29:15 2010
@@ -110,6 +110,12 @@
         .getInitParameter("CUSTOM_FACES_MESSAGE_FACTORY");
 
     /*
+     * activate
+     */
+    static final String ACTIVATE_REQUIRED_INITIALIZATION = WebXmlUtils
+        .getInitParameter("ACTIVATE_REQUIRED_INITIALIZATION");
+    
+    /*
      * deactivate
      */
     @Deprecated
@@ -132,9 +138,6 @@
     static final String DEACTIVATE_VALIDATION_PARAMETERS = WebXmlUtils
         .getInitParameter("DEACTIVATE_VALIDATION_PARAMETERS");
 
-    static final String DEACTIVATE_REQUIRED_INITIALIZATION = WebXmlUtils
-        .getInitParameter("DEACTIVATE_REQUIRED_INITIALIZATION");
-
     //there is nothing like DEACTIVATE_DEFAULT_VALIDATION_INTERCEPTOR
     //use ExtValContext.getContext().denyRendererInterceptor(...) within an extval-StartupListener
 

Modified: myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java?rev=906137&r1=906136&r2=906137&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java
(original)
+++ myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java
Wed Feb  3 17:29:15 2010
@@ -230,8 +230,11 @@
 
     private void initRequiredInitialization()
     {
-        boolean requiredInitialization = !"true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_REQUIRED_INITIALIZATION);
+        if(WebXmlParameter.ACTIVATE_REQUIRED_INITIALIZATION != null)
+        {
+            boolean requiredInitialization = "true".equalsIgnoreCase(WebXmlParameter.ACTIVATE_REQUIRED_INITIALIZATION);
 
-        ExtValContext.getContext().addGlobalProperty("init:required", requiredInitialization);
+            ExtValContext.getContext().addGlobalProperty("init:required", requiredInitialization);
+        }
     }
 }



Mime
View raw message