You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by dr...@apache.org on 2009/11/21 19:37:34 UTC
svn commit: r882963 - in
/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src:
main/java/org/apache/tapestry5/ main/resources/org/apache/tapestry5/
test/app1/ test/java/org/apache/tapestry5/integration/
test/java/org/apache/tapestry5/integration/...
Author: drobiazko
Date: Sat Nov 21 18:37:28 2009
New Revision: 882963
URL: http://svn.apache.org/viewvc?rev=882963&view=rev
Log:
TAP5-719: Component LinkSubmit doesn't work
Added:
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java (with props)
Modified:
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/java/org/apache/tapestry5/MarkupConstants.java
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
Modified: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/java/org/apache/tapestry5/MarkupConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/java/org/apache/tapestry5/MarkupConstants.java?rev=882963&r1=882962&r2=882963&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/java/org/apache/tapestry5/MarkupConstants.java (original)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/java/org/apache/tapestry5/MarkupConstants.java Sat Nov 21 18:37:28 2009
@@ -27,7 +27,7 @@
* allowing the click event to occur. Refrences a client-side JavaScript function that displays a standard "wait for
* page to load" modal dialog.
*/
- public static final String WAIT_FOR_PAGE = "javascript:Tapestry.waitForPage(event);";
+ public static final String WAIT_FOR_PAGE = "javascript:return Tapestry.waitForPage(event);";
/**
* Name of attribute for intercepting the user clicking a link.
Modified: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=882963&r1=882962&r2=882963&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js (original)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js Sat Nov 21 18:37:28 2009
@@ -61,7 +61,7 @@
*/
waitForPage : function(event)
{
- if (Tapestry.pageLoaded) return;
+ if (Tapestry.pageLoaded) return true;
Event.extend(event || window.event).stop();
@@ -107,7 +107,16 @@
// A rare race condition.
if (Tapestry.pageLoaded)
+ {
hideDialog.call(null);
+
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
},
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml?rev=882963&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/LinkSubmitWithoutValidatorDemo.tml Sat Nov 21 18:37:28 2009
@@ -0,0 +1,12 @@
+<html t:type="border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+ <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>
+ <hr/>
+ Result: ${result}
+
+</html>
\ No newline at end of file
Modified: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java?rev=882963&r1=882962&r2=882963&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java (original)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java Sat Nov 21 18:37:28 2009
@@ -2545,6 +2545,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/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java?rev=882963&r1=882962&r2=882963&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java (original)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java Sat Nov 21 18:37:28 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/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java?rev=882963&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java Sat Nov 21 18:37:28 2009
@@ -0,0 +1,35 @@
+// Copyright 2009 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+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;
+
+public class LinkSubmitWithoutValidatorDemo
+{
+ @Property
+ private String searchString;
+
+ @Property
+ @Persist
+ private String result;
+
+ @OnEvent(component = "searchForm", value = EventConstants.SUCCESS)
+ void onSearchSuccess()
+ {
+ result = "" + searchString + " not found!";
+ }
+}
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LinkSubmitWithoutValidatorDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain