tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlewissh...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry/valid ValidationDelegate.java
Date Wed, 17 Dec 2003 19:51:08 GMT
rlewisshell    2003/12/17 11:51:08

  Modified:    framework/src/org/apache/tapestry/valid
                        ValidationDelegate.java
  Log:
  [ 25585 ] ValidationDelegate throws NPE for some new FieldLabel/ValidField
  
  Revision  Changes    Path
  1.5       +9 -2      jakarta-tapestry/framework/src/org/apache/tapestry/valid/ValidationDelegate.java
  
  Index: ValidationDelegate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/valid/ValidationDelegate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ValidationDelegate.java	17 Oct 2003 18:53:52 -0000	1.4
  +++ ValidationDelegate.java	17 Dec 2003 19:51:08 -0000	1.5
  @@ -62,6 +62,7 @@
   import java.util.List;
   import java.util.Map;
   
  +import org.apache.tapestry.IForm;
   import org.apache.tapestry.IMarkupWriter;
   import org.apache.tapestry.IRender;
   import org.apache.tapestry.IRequestCycle;
  @@ -432,7 +433,13 @@
           if (_trackingMap == null)
               return false;
   
  -        String formName = component.getForm().getName();
  +        IForm form = component.getForm();
  +        // if there is no form, the component cannot have been rewound or rendered into
a form yet
  +        // so assume it cannot have errors.
  +        if (form == null)
  +            return false;
  +        
  +        String formName = form.getName();
           Map formMap = (Map) _trackingMap.get(formName);
   
           if (formMap == null)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message