Updated Branches:
  refs/heads/5.3 0f3207441 -> 8292d0583

TAP5-1890: PlaceholderBlock should implement RenderCommand. merge from master


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8292d058
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8292d058
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8292d058

Branch: refs/heads/5.3
Commit: 8292d0583fa4fb836b77694390e0c9a503fbe078
Parents: 0f32074
Author: Kalle Korhonen <[email protected]>
Authored: Sat Apr 13 16:36:06 2013 +0100
Committer: Kalle Korhonen <[email protected]>
Committed: Sat Apr 13 16:36:06 2013 +0100

----------------------------------------------------------------------
 .../structure/ComponentPageElementImpl.java        |    7 ++++-
 tapestry-core/src/test/app1/nested/ZoneDemo.tml    |    5 +++
 .../tapestry5/integration/app1/ZoneTests.java      |   20 +++++++++++++++
 .../integration/app1/pages/nested/ZoneDemo.java    |    9 ++++++
 4 files changed, 40 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8292d058/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
index 318279e..9b32aec 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
@@ -63,12 +63,17 @@ public class ComponentPageElementImpl extends BaseLocatable 
implements Component
     /**
      * Placeholder for the body used when the component has no real content.
      */
-    private static class PlaceholderBlock implements Block, Renderable
+    private static class PlaceholderBlock implements Block, Renderable, 
RenderCommand
     {
         public void render(MarkupWriter writer)
         {
         }
 
+        public void render(MarkupWriter writer, RenderQueue queue)
+        {
+        }
+
+
         @Override
         public String toString()
         {

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8292d058/tapestry-core/src/test/app1/nested/ZoneDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/nested/ZoneDemo.tml 
b/tapestry-core/src/test/app1/nested/ZoneDemo.tml
index 4574232..51daf7d 100644
--- a/tapestry-core/src/test/app1/nested/ZoneDemo.tml
+++ b/tapestry-core/src/test/app1/nested/ZoneDemo.tml
@@ -82,6 +82,9 @@
             <t:actionlink t:id="blankUpdate" zone="output">Blank the 
zone</t:actionlink>
         </li>
         <li>
+            <t:actionLink t:id="updateZoneWithEmptyBody" zone="output">Update 
zone with empty body</t:actionLink>
+        </li>
+        <li>
             <t:actionlink t:id="poorlyFormattedFail" zone="output">Poorly 
formatted server-side
                 failure
             </t:actionlink>
@@ -103,6 +106,8 @@
 
     <t:block id="empty"/>
 
+    <t:zone t:id="zoneWithEmptyBody"/>
+
     <t:block id="forUnknownZone">
         <p>Content for the unknown zone.</p>
     </t:block>

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8292d058/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
index 33eb93c..6795a40 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
@@ -338,4 +338,24 @@ public class ZoneTests extends TapestryCoreTestCase
         assertCSS("demo-aip", "text-decoration", "underline");
     }
 
+
+    /**
+    * TAP5-1890
+    */
+    @Test
+    public void update_zone_with_empty_body()
+    {
+        openLinks("Zone Demo");
+
+        assertText("zone-update-message", "");
+
+        click("link=Update zone with empty body");
+
+        // Give it some time to process.
+
+        sleep(100);
+
+        assertText("zone-update-message", "Zone updated.");
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8292d058/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
index ac7e262..21d0456 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
@@ -57,6 +57,9 @@ public class ZoneDemo
     @InjectComponent
     private Zone output;
 
+    @InjectComponent
+    private Zone zoneWithEmptyBody;
+
     @InjectPage
     private SecurePage securePage;
 
@@ -201,6 +204,12 @@ public class ZoneDemo
         return empty;
     }
 
+
+    Object onActionFromUpdateZoneWithEmptyBody()
+    {
+        return zoneWithEmptyBody.getBody();
+    }
+
     void afterRender()
     {
         jss.importStylesheet(new StylesheetLink(overridesCSS, new 
StylesheetOptions().asAjaxInsertionPoint()));

Reply via email to