tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andy...@apache.org
Subject svn commit: r596085 - in /tapestry/tapestry4/trunk/tapestry-framework/src: test-data/app1/ test/org/apache/tapestry/integration/app1/pages/
Date Sun, 18 Nov 2007 13:55:32 GMT
Author: andyhot
Date: Sun Nov 18 05:55:32 2007
New Revision: 596085

URL: http://svn.apache.org/viewvc?rev=596085&view=rev
Log:
integration test for TAPESTRY-1775

Added:
    tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html
      - copied, changed from r595958, tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1141.html
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1775.java
      - copied, changed from r595956, tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java
Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1141.java

Copied: tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html (from
r595958, tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1141.html)
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html?p2=tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html&p1=tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1141.html&r1=595958&r2=596085&rev=596085&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1141.html (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html Sun Nov 18
05:55:32 2007
@@ -1,16 +1,26 @@
-<html jwcid="@Shell" title="TAPESTRY-1141">
-    <body jwcid="@Body">    
-        <h2>Async form fails if keyboard is used to trigger the submit...</h2>
-        <form jwcid="@Form" async="ognl:true" json="ognl:false" listener="listener:doProcess"
-              updateComponents="testme">
-            <span jwcid="@For" source="ognl:{'1','2','3'}" value="ognl:num">
-                <input jwcid="test@TextField" value="ognl:num" id="num"/>
-            </span>
-            <br />
-            <input jwcid="@Submit" value="Go!"/>
+<html jwcid="@Shell" title="TAPESTRY-1775">
+    <body jwcid="@Body">
+        <h2>Multiple submit buttons inside async form can invoke incorrect listener</h2>
+
+        <form jwcid="@Form" async="true" updateComponents="in">
+            <div jwcid="in@Any">
+            <input jwcid="@Submit" value="First" listener="listener:doFirst" async="true"/>
+            <input jwcid="@Submit" value="Second" listener="listener:doSecond" async="true"/>
+            <input type="submit" value="Nothing"/>
+            <span jwcid="msg@Insert" value="ognl:message" style="color:red;" renderTag="true">Message</span>
+            </div>
         </form>
-        
-        <div jwcid="testme@Any">[<span jwcid="@Insert" value="ognl:text"/>]</div>

-        
+
+        <form jwcid="@Form" async="true" updateComponents="msg2"
+              success="listener:doSuccess" cancel="listener:doCancel" refresh="listener:doRefresh">
+            <input jwcid="@Submit" value="Success" async="true"/>
+            <input jwcid="@Submit" value="Cancel" submitType="cancel" async="true"/>
+            <input jwcid="@Submit" value="Refresh" submitType="refresh" async="true"/>
+        </form>
+
+        <div jwcid="msg2@Any" style="color:red;">
+            <span jwcid="@Insert" value="ognl:message">Message2</span>
+        </div>
+
     </body>
 </html>

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java?rev=596085&r1=596084&r2=596085&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java
Sun Nov 18 05:55:32 2007
@@ -14,6 +14,9 @@
 
 package org.apache.tapestry.integration.app1.pages;
 
+/**
+ * Integration test for TAPESTRY-1129.
+ */
 public abstract class Tap1129 extends Home { 
     public abstract String getText();
     public abstract void setText(String text);

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1141.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1141.java?rev=596085&r1=596084&r2=596085&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1141.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1141.java
Sun Nov 18 05:55:32 2007
@@ -14,6 +14,9 @@
 
 package org.apache.tapestry.integration.app1.pages;
 
+/**
+ * Integration test for TAPESTRY-1141.
+ */
 public abstract class Tap1141 extends Home {        
     public abstract String getText();
     public abstract void setText(String text);

Copied: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1775.java
(from r595956, tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1775.java?p2=tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1775.java&p1=tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java&r1=595956&r2=596085&rev=596085&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1129.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/app1/pages/Tap1775.java
Sun Nov 18 05:55:32 2007
@@ -14,15 +14,47 @@
 
 package org.apache.tapestry.integration.app1.pages;
 
-public abstract class Tap1129 extends Home { 
-    public abstract String getText();
-    public abstract void setText(String text);
-    
-    public abstract boolean getFlag();
-    public abstract void setFlag(boolean flag);
-    
+/**
+ * Integration test for TAPESTRY-1775.
+ */
+public abstract class Tap1775 extends Home {
+
+    public abstract String getMessage();
+    public abstract void setMessage(String msg);
+
+    public void addToMessage(String msg)
+    {
+        String original = getMessage();
+        setMessage(original==null ? msg : original + " " + msg);
+    }
+
+    public void doSubmit()
+    {
+        addToMessage("SUBMIT");
+    }
+
+    public void doFirst()
+    {
+        addToMessage("FIRST");
+    }
+
+    public void doSecond()
+    {
+        addToMessage("SECOND");
+    }
+
+    public void doSuccess()
+    {
+        addToMessage("SUCCESS");
+    }
+
+    public void doCancel()
+    {
+        addToMessage("CANCEL");
+    }
+
     public void doRefresh()
     {
-        setFlag(!getFlag());
+        addToMessage("REFRESH");
     }
-}
+}
\ No newline at end of file



Mime
View raw message