You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/02/29 21:25:56 UTC

svn commit: r632426 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry/internal/services/ClientBehaviorSupportImpl.java test/app1/ZoneDemo.tml

Author: hlship
Date: Fri Feb 29 12:25:52 2008
New Revision: 632426

URL: http://svn.apache.org/viewvc?rev=632426&view=rev
Log:
TAPESTRY-1650: Add support for injecting (via Ajax) new content into an existing client-side form

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ClientBehaviorSupportImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/ZoneDemo.tml

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ClientBehaviorSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ClientBehaviorSupportImpl.java?rev=632426&r1=632425&r2=632426&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ClientBehaviorSupportImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ClientBehaviorSupportImpl.java Fri Feb 29 12:25:52 2008
@@ -125,7 +125,8 @@
 
     public void writeInitializationScript()
     {
-        if (_zonesDirty) _pageRenderSupport.addScript(ZONE_INITIALIZER_STRING, _zones, _links);
+        if (_validations.length() > 0)
+            _pageRenderSupport.addScript("Tapestry.registerValidation(%s);", _validations);
 
         if (_subForms.length() > 0)
             _pageRenderSupport.addScript("Tapestry.initializeFormFragments(%s);", _subForms);
@@ -133,7 +134,6 @@
         if (_injectors.length() > 0)
             _pageRenderSupport.addScript("Tapestry.initializeFormInjectors(%s);", _injectors);
 
-        if (_validations.length() > 0)
-            _pageRenderSupport.addScript("Tapestry.registerValidation(%s);", _validations);
+        if (_zonesDirty) _pageRenderSupport.addScript(ZONE_INITIALIZER_STRING, _zones, _links);
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/ZoneDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/ZoneDemo.tml?rev=632426&r1=632425&r2=632426&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/ZoneDemo.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/ZoneDemo.tml Fri Feb 29 12:25:52 2008
@@ -2,7 +2,7 @@
     <h1>Zone/Ajax Demo</h1>
 
 
-    <t:zone t:id="output" style="float:right; width: 800px;">
+    <t:zone t:id="output" style="float:right; width: 800px;" update="slidedown">
         No name has been selected.
 
         <t:block id="showName">