You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by te...@apache.org on 2009/08/12 21:15:26 UTC

svn commit: r803671 - in /tapestry/tapestry5/trunk/tapestry-core/src/test: app1/ java/org/apache/tapestry5/integration/ java/org/apache/tapestry5/integration/app1/pages/

Author: tedst
Date: Wed Aug 12 19:15:25 2009
New Revision: 803671

URL: http://svn.apache.org/viewvc?rev=803671&view=rev
Log:
Test to prove TAP5-719 is fixed

Added:
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml
      - copied, changed from r802571, tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitDemo.tml
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java

Copied: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml (from r802571, tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitDemo.tml)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml?p2=tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml&p1=tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitDemo.tml&r1=802571&r2=803671&rev=803671&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitDemo.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml Wed Aug 12 19:15:25 2009
@@ -1,21 +1,12 @@
 <html t:type="border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-    <h1>Link Submit Demo</h1>
-
-    <t:form>
-        <t:errors/>
-
-        <t:textfield t:id="name"/>
-        <br/>
-        <t:linksubmit t:id="fred">Fred</t:linksubmit>
-        <t:linksubmit t:id="barney" defer="true" event="neighbor">Barney</t:linksubmit>
+    <h1>Link Submit Without Validator Demo</h1>
 
+    <t:form t:id="searchForm">
+        <t:label for="searchField"/>:
+        <t:textField t:id="searchField" label="literal:Search string" value="searchString"/>
+        <t:linksubmit t:id="searchLink">Search</t:linksubmit>
     </t:form>
-
-    <dl>
-        <dt>Name</dt>
-        <dd id="name-value">${name}</dd>
-        <dt>Last Clicked</dt>
-        <dd id="last-clicked">${lastClicked}</dd>
-    </dl>
+    <hr/>
+    Result: ${result}
 
 </html>
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java?rev=803671&r1=803670&r2=803671&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java Wed Aug 12 19:15:25 2009
@@ -2562,6 +2562,20 @@
     }
 
     /**
+     * TAP5-719
+     */
+    public void link_submit_without_validator()
+    {
+        start("LinkSubmit Without Validator Demo");
+
+        type("searchField", "Anders Haraldsson");
+
+        clickAndWait("link=Search");
+
+        assertTextPresent("Result: Anders Haraldsson not found!");
+    }
+
+    /**
      * TAP5-309
      */
     public void conflict_between_property_annotation_and_existing_method()

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java?rev=803671&r1=803670&r2=803671&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java Wed Aug 12 19:15:25 2009
@@ -97,6 +97,9 @@
 
             new Item("LinkSubmitDemo", "LinkSubmit Demo", "JavaScript LinkSubmit component"),
 
+            new Item("LinkSubmitWithoutValidatorDemo", "LinkSubmit Without Validator Demo",
+                    "Demonstrates that the LinkSubmit component is working without a validator on any of fields in the form"),
+
             new Item("PerFormValidationMessageDemo", "Per-Form Validation Messages",
                      "Per-form configuration of validation messages and constraints."),
 

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java?rev=803671&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java Wed Aug 12 19:15:25 2009
@@ -0,0 +1,28 @@
+package org.apache.tapestry5.integration.app1.pages;
+
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.OnEvent;
+import org.apache.tapestry5.EventConstants;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: steent
+ * Date: 2009-aug-12
+ * Time: 19:19:35
+ * To change this template use File | Settings | File Templates.
+ */
+public class LinkSubmitWithoutValidatorDemo {
+    @Property
+    private String searchString;
+
+    @Property
+    @Persist
+    private String result;
+
+    @OnEvent(component = "searchForm", value = EventConstants.SUCCESS)
+    void onSearchSuccess()
+    {
+        result = "" + searchString + " not found!";
+    }
+}