You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cr...@apache.org on 2006/07/17 17:28:35 UTC

svn commit: r422740 - in /beehive/trunk/netui: src/compiler-core/org/apache/beehive/netui/compiler/model/validation/ test/webapps/drt/testRecorder/tests/

Author: crogers
Date: Mon Jul 17 08:28:34 2006
New Revision: 422740

URL: http://svn.apache.org/viewvc?rev=422740&view=rev
Log:
Fix for http://issues.apache.org/jira/browse/BEEHIVE-1118 - write out form bean validations in order they're declared.

This is a patch from Andrew McCulloch. I've added the fix as well as the updated testRecorder validator tests. This commit does not include the compiler tests due to diffs on the order of the <msg> elements associated to a field rule. Thanks Andrew.

tests: NetUI BVT (WinXP pass)


Modified:
    beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/model/validation/ValidatableEntity.java
    beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs.xml
    beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs11.xml
    beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgBundles.xml

Modified: beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/model/validation/ValidatableEntity.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/model/validation/ValidatableEntity.java?rev=422740&r1=422739&r2=422740&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/model/validation/ValidatableEntity.java (original)
+++ beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/model/validation/ValidatableEntity.java Mon Jul 17 08:28:34 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,14 +21,14 @@
 import org.apache.beehive.netui.compiler.model.XmlModelWriter;
 import org.w3c.dom.Element;
 
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Iterator;
 
 class ValidatableEntity extends XmlElementSupport
 {
     private String _entityName;
-    private Map _fields = new HashMap();
+    private Map _fields = new LinkedHashMap();
     
     
     public ValidatableEntity( String entityName )

Modified: beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs.xml
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs.xml?rev=422740&r1=422739&r2=422740&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs.xml Mon Jul 17 08:28:34 2006
@@ -272,10 +272,10 @@
             <input type="submit" name="actionOverride:validate" value="Click">
         </form>
         <hr>
-        Min length for item3 is six chars
-minimum length for item1 is two chars
-Minimum length validation: item four cannot be less than eight chars.
+        minimum length for item1 is two chars
 Minimum length validation: item two cannot be less than four chars.
+Min length for item3 is six chars
+Minimum length validation: item four cannot be less than eight chars.
 
     </body>
 

Modified: beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs11.xml
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs11.xml?rev=422740&r1=422739&r2=422740&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs11.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgArgs11.xml Mon Jul 17 08:28:34 2006
@@ -272,10 +272,10 @@
             <input type="submit" name="actionOverride:validate" value="Click">
         </form>
         <hr>
-        Min length for item3 is six chars
-minimum length for item1 is two chars
-Minimum length validation: item four cannot be less than eight chars.
+        minimum length for item1 is two chars
 Minimum length validation: item two cannot be less than four chars.
+Min length for item3 is six chars
+Minimum length validation: item four cannot be less than eight chars.
 
     </body>
 

Modified: beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgBundles.xml
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgBundles.xml?rev=422740&r1=422739&r2=422740&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgBundles.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidatorMsgBundles.xml Mon Jul 17 08:28:34 2006
@@ -280,10 +280,10 @@
             <input type="submit" name="actionOverride:validate" value="Click">
         </form>
         <hr>
-        Minimum length validation: Item3 cannot be less than six chars.
-minimum length for item1 is two chars
-Maximum length validation: item four cannot be more than eight chars.
+        minimum length for item1 is two chars
 Maximum length validation: item two cannot be more than four chars.
+Minimum length validation: Item3 cannot be less than six chars.
+Maximum length validation: item four cannot be more than eight chars.
 
     </body>
 
@@ -293,4 +293,4 @@
    </ses:tests>
    <ses:endDate>31 Aug 2005, 12:01:35.813 PM MDT</ses:endDate>
    <ses:testCount>2</ses:testCount>
-</ses:recorderSession>
\ No newline at end of file
+</ses:recorderSession>