myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r831793 - in /myfaces/extensions/validator/trunk: component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/interceptor/ validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/...
Date Mon, 02 Nov 2009 02:03:15 GMT
Author: gpetracek
Date: Mon Nov  2 02:03:14 2009
New Revision: 831793

URL: http://svn.apache.org/viewvc?rev=831793&view=rev
Log:
small changes

Modified:
    myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/interceptor/TrinidadValidationExceptionInterceptor.java
    myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/storage/ModelValidationEntry.java
    myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java

Modified: myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/interceptor/TrinidadValidationExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/interceptor/TrinidadValidationExceptionInterceptor.java?rev=831793&r1=831792&r2=831793&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/interceptor/TrinidadValidationExceptionInterceptor.java
(original)
+++ myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/interceptor/TrinidadValidationExceptionInterceptor.java
Mon Nov  2 02:03:14 2009
@@ -142,8 +142,9 @@
 
     protected boolean processComponent(UIComponent uiComponent)
     {
-        return TRINIDAD_CORE_INPUT_TEXT.equals(uiComponent.getClass().getName()) ||
-               TRINIDAD_CORE_INPUT_DATE.equals(uiComponent.getClass().getName());
+        return uiComponent != null &&
+                (TRINIDAD_CORE_INPUT_TEXT.equals(uiComponent.getClass().getName()) ||
+                 TRINIDAD_CORE_INPUT_DATE.equals(uiComponent.getClass().getName()));
     }
 
     private String getLabel(UIComponent uiComponent)

Modified: myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/storage/ModelValidationEntry.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/storage/ModelValidationEntry.java?rev=831793&r1=831792&r2=831793&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/storage/ModelValidationEntry.java
(original)
+++ myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/storage/ModelValidationEntry.java
Mon Nov  2 02:03:14 2009
@@ -122,21 +122,11 @@
         return validationTargets;
     }
 
-    public void setValidationTargets(List<Object> validationTargets)
-    {
-        this.validationTargets = validationTargets;
-    }
-
     public List<String> getValidationTargetExpressions()
     {
         return validationTargetExpressions;
     }
 
-    public void setValidationTargetExpressions(List<String> validationTargetExpressions)
-    {
-        this.validationTargetExpressions = validationTargetExpressions;
-    }
-
     public Object getMetaDataSourceObject()
     {
         return metaDataSourceObject;

Modified: myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java?rev=831793&r1=831792&r2=831793&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
(original)
+++ myfaces/extensions/validator/trunk/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
Mon Nov  2 02:03:14 2009
@@ -368,15 +368,15 @@
     private static void addValidationTargets(ModelValidationEntry modelValidationEntry)
     {
         Object target;
-        for (String modelValidationTarget : modelValidationEntry.getValidationTargetExpressions())
+        for (String modelValidationTargetExpression : modelValidationEntry.getValidationTargetExpressions())
         {
-            target = resolveTarget(modelValidationEntry.getMetaDataSourceObject(), modelValidationTarget);
+            target = resolveTarget(modelValidationEntry.getMetaDataSourceObject(), modelValidationTargetExpression);
 
             if (target == null && LOG.isErrorEnabled())
             {
                 LOG.error("target unreachable - source class: " +
                         modelValidationEntry.getMetaDataSourceObject().getClass().getName()
+
-                        " target to resolve: " + modelValidationTarget);
+                        " target to resolve: " + modelValidationTargetExpression);
             }
 
             modelValidationEntry.addValidationTarget(target);
@@ -452,27 +452,27 @@
         }
     }
 
-    private static Object resolveTarget(Object metaDataSourceObject, String modelValidationTarget)
+    private static Object resolveTarget(Object metaDataSourceObject, String modelValidationTargetExpression)
     {
         ELHelper elHelper = ExtValUtils.getELHelper();
 
-        if (elHelper.isELTermWellFormed(modelValidationTarget))
+        if (elHelper.isELTermWellFormed(modelValidationTargetExpression))
         {
-            if (elHelper.isELTermValid(FacesContext.getCurrentInstance(), modelValidationTarget))
+            if (elHelper.isELTermValid(FacesContext.getCurrentInstance(), modelValidationTargetExpression))
             {
                 return elHelper.getValueOfExpression(
-                        FacesContext.getCurrentInstance(), new ValueBindingExpression(modelValidationTarget));
+                        FacesContext.getCurrentInstance(), new ValueBindingExpression(modelValidationTargetExpression));
             }
             else
             {
                 if (LOG.isErrorEnabled())
                 {
-                    LOG.error("an invalid binding is used: " + modelValidationTarget);
+                    LOG.error("an invalid binding is used: " + modelValidationTargetExpression);
                 }
             }
         }
 
-        String[] properties = modelValidationTarget.split("\\.");
+        String[] properties = modelValidationTargetExpression.split("\\.");
 
         Object result = metaDataSourceObject;
         for (String property : properties)



Mime
View raw message