[seam-commits] Seam SVN: r12699 - modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri May 7 18:32:04 EDT 2010


Author: lincolnthree
Date: 2010-05-07 18:32:04 -0400 (Fri, 07 May 2010)
New Revision: 12699

Modified:
   modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java
   modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java
Log:
Updates for XValidator bug on actual submit.

Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java	2010-05-07 06:26:05 UTC (rev 12698)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java	2010-05-07 22:32:04 UTC (rev 12699)
@@ -59,13 +59,13 @@
 
    UIForm form = null;
    UIValidateForm validator = null;
-   private Map<String, UIInput> components = null;
+   private Map<String, UIInput> components;
 
    public void interceptComponentTree(@Observes @Before final UIValidateForm event)
    {
       validator = event;
       form = validator.locateForm();
-      components = locateAliasedComponents(event);
+      locateAliasedComponents(event);
    }
 
    public void cleanupComponentTree(@Observes @After final UIValidateForm event)
@@ -123,9 +123,9 @@
       return parameterName;
    }
 
-   public HashMap<String, UIInput> locateAliasedComponents(final UIValidateForm validator)
+   public void locateAliasedComponents(final UIValidateForm validator)
    {
-      HashMap<String, UIInput> result = new HashMap<String, UIInput>();
+      components = new HashMap<String, UIInput>();
       String fields = validator.getFields();
       if ((fields != null) && !"".equals(fields.trim()))
       {
@@ -146,7 +146,6 @@
             components.put(aliasFieldName, component);
          }
       }
-      return result;
    }
 
    private UIInput findComponent(final String alias, final String clientId)

Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java	2010-05-07 06:26:05 UTC (rev 12698)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java	2010-05-07 22:32:04 UTC (rev 12699)
@@ -24,6 +24,7 @@
 
 import java.io.IOException;
 
+import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.util.AnnotationLiteral;
 import javax.faces.component.FacesComponent;
 import javax.faces.component.UIComponent;
@@ -72,7 +73,8 @@
    public void validate(final FacesContext context)
    {
       context.getApplication().publishEvent(context, PreValidateEvent.class, UIValidateForm.class, this);
-      BeanManagerAccessor.getManager().fireEvent(this, BEFORE);
+      BeanManager manager = BeanManagerAccessor.getManager();
+      manager.fireEvent(this, BEFORE);
 
       Validator validator = context.getApplication().createValidator(validatorId);
       if (validator == null)
@@ -91,7 +93,7 @@
          context.addMessage(null, e.getFacesMessage());
       }
 
-      BeanManagerAccessor.getManager().fireEvent(this, AFTER);
+      manager.fireEvent(this, AFTER);
       context.getApplication().publishEvent(context, PostValidateEvent.class, UIValidateForm.class, this);
    }
 



More information about the seam-commits mailing list