Author: hlship
Date: Fri Oct 17 09:44:51 2008
New Revision: 705667
URL: http://svn.apache.org/viewvc?rev=705667&view=rev
Log:
TAP5-283: FormFragments are not ignored if the form has client validation
disabled
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=705667&r1=705666&r2=705667&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
Fri Oct 17 09:44:51 2008
@@ -1309,7 +1309,13 @@
this.showFunc = Tapestry.ElementEffect[spec.show] ||
Tapestry.ElementEffect.slidedown;
this.hideFunc = Tapestry.ElementEffect[spec.hide] ||
Tapestry.ElementEffect.slideup;
- $(this.hidden.form).observe(Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT,
function()
+ var form = $(this.hidden.form);
+
+ // TAP5-283: Force creation of the FormEventManager if it does not
already exist.
+
+ form.getFormEventManager();
+
+ $(form).observe(Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT, function()
{
// On a submission, if the fragment is not visible, then wipe out
its
// form submission data, so that no processing or validation
occurs on the server.
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java?rev=705667&r1=705666&r2=705667&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java
Fri Oct 17 09:44:51 2008
@@ -31,7 +31,7 @@
@Property
private boolean codeVisible;
- @Component
+ @Component(parameters = {"clientValidation=false"})
private Form form;
@InjectPage