You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/07/24 20:34:11 UTC

svn commit: r425142 - in /tapestry/tapestry4/trunk: ./ tapestry-examples/Workbench/src/context/WEB-INF/ tapestry-framework/src/java/org/apache/tapestry/form/ tapestry-framework/src/scripts/ tapestry-framework/src/test/org/apache/tapestry/form/

Author: jkuhnert
Date: Mon Jul 24 11:34:10 2006
New Revision: 425142

URL: http://svn.apache.org/viewvc?rev=425142&view=rev
Log:
Upgraded testng to new 5.0 version. (available on howardlewisship.com ) Fixed TAPESTRY-240. 
Fixed workbench demo fields using old this.form.events javascript syntax

Modified:
    tapestry/tapestry4/trunk/pom.xml
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Upload.page
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java
    tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestSelectOption.xml
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/FormSupportTest.java

Modified: tapestry/tapestry4/trunk/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/pom.xml?rev=425142&r1=425141&r2=425142&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/pom.xml (original)
+++ tapestry/tapestry4/trunk/pom.xml Mon Jul 24 11:34:10 2006
@@ -138,7 +138,7 @@
             <dependency>
                 <groupId>org.testng</groupId>
                 <artifactId>testng</artifactId>
-                <version>4.7</version>
+                <version>5.0</version>
                 <classifier>jdk15</classifier>
                 <scope>test</scope>
             </dependency>

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page?rev=425142&r1=425141&r2=425142&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page Mon Jul 24 11:34:10 2006
@@ -34,7 +34,7 @@
   
   <component id="inputEnabled" type="Checkbox">
     <binding name="value" value="clientValidationEnabled"/> 
-    <binding name="onchange" value="literal:javascript:this.form.events.submit();"/>
+    <binding name="onchange" value="literal:tapestry.form.submit(this.form)"/>
   </component>
   
   <component id="showError" type="ShowError">

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Upload.page
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Upload.page?rev=425142&r1=425141&r2=425142&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Upload.page (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Upload.page Mon Jul 24 11:34:10 2006
@@ -29,7 +29,7 @@
   
   <component id="inputEnabled" type="Checkbox">
     <binding name="value" value="clientValidationEnabled"/> 
-    <binding name="onchange" value="literal:javascript:this.form.events.submit();"/>
+    <binding name="onchange" value="literal:tapestry.form.submit(this.form)"/>
   </component>
   
   <component id="inputWidth" type="PropertySelection">

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java?rev=425142&r1=425141&r2=425142&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java Mon Jul 24 11:34:10 2006
@@ -499,9 +499,6 @@
         int portI = (port == null) ? 0 : port.intValue();
         writeTag(_writer, method, link.getURL(scheme, null, portI, null, false));
         
-        // For HTML compatibility
-        _writer.attribute("name", formId);
-
         // For XHTML compatibility
         _writer.attribute("id", formId);
 

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestSelectOption.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestSelectOption.xml?rev=425142&r1=425141&r2=425142&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestSelectOption.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestSelectOption.xml Mon Jul 24 11:34:10 2006
@@ -30,7 +30,7 @@
 		
 		<assert-output name="Form">
 <![CDATA[
-<form method="post" action="/selopt/app" name="Form" id="Form">
+<form method="post" action="/selopt/app" id="Form">
 ]]>
 		</assert-output>
 		
@@ -119,7 +119,7 @@
 		
 		<assert-output name="Form">
 <![CDATA[
-<form method="post" action="/selopt/app" name="Form" id="Form">
+<form method="post" action="/selopt/app" id="Form">
 ]]>
 		</assert-output>
 		
@@ -215,7 +215,7 @@
 		
 		<assert-output name="Form">
 <![CDATA[
-<form method="post" action="/selopt/app" name="Form" id="Form">
+<form method="post" action="/selopt/app" id="Form">
 ]]>
 		</assert-output>
 		
@@ -290,7 +290,7 @@
 		
 		<assert-output name="Second Form">
 <![CDATA[
-<form method="post" action="/selopt/app" name="Form_0" id="Form_0" direct="false">
+<form method="post" action="/selopt/app" id="Form_0" direct="false">
 ]]>	
 		</assert-output>
 	</request>

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/FormSupportTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/FormSupportTest.java?rev=425142&r1=425141&r2=425142&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/FormSupportTest.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/FormSupportTest.java Mon Jul 24 11:34:10 2006
@@ -190,8 +190,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         render.render(writer, cycle);
@@ -310,7 +309,6 @@
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
 
-        writer.attribute("name", "myform");
         writer.attribute("id", "myform");
         
         support.addInitializationScript("Tapestry.onsubmit('myform', function (event)"
@@ -382,7 +380,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
         writer.attribute("enctype", "foo/bar");
 
@@ -504,8 +502,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         render.render(writer, cycle);
@@ -678,8 +675,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         render.render(writer, cycle);
@@ -755,8 +751,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         support.addInitializationScript("Tapestry.onreset('myform', function (event)"
@@ -1036,8 +1031,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         render.render(writer, cycle);
@@ -1121,8 +1115,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         render.render(writer, cycle);
@@ -1187,8 +1180,7 @@
         writer.begin("form");
         writer.attribute("method", "post");
         writer.attribute("action", "https://foo.bar/app");
-
-        writer.attribute("name", "myform");
+        
         writer.attribute("id", "myform");
 
         render.render(writer, cycle);
@@ -1349,7 +1341,6 @@
         writer.attribute("method", "post");
         writer.attribute("action", "/app");
         
-        writer.attribute("name", "myform");
         writer.attribute("id", "myform");
         
         form.setBody(new IRender()