tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r510615 - in /tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services: PageElementFactoryImpl.java PageLoaderProcessor.java
Date Thu, 22 Feb 2007 18:30:23 GMT
Author: hlship
Date: Thu Feb 22 10:30:22 2007
New Revision: 510615

URL: http://svn.apache.org/viewvc?view=rev&rev=510615
Log:
Place <t:body> elements correctly within the body of the active element (not in the
template of the loading component).
[TAPESTRY-1290]

Modified:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java?view=diff&rev=510615&r1=510614&r2=510615
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java
(original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java
Thu Feb 22 10:30:22 2007
@@ -191,8 +191,7 @@
             @Override
             public String toString()
             {
-                // TODO: Change this to be nested id
-                return String.format("RenderBody[%s]", component.getId());
+                return String.format("RenderBody[%s]", component.getNestedId());
             }
         };
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java?view=diff&rev=510615&r1=510614&r2=510615
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java
(original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java
Thu Feb 22 10:30:22 2007
@@ -211,11 +211,16 @@
 
     private void addRenderBodyElement()
     {
-        PageElement element = _pageElementFactory.newRenderBodyElement(_loadingElement);
+        PageElement element = newRenderBodyElement();
 
         _loadingElement.addToTemplate(element);
     }
 
+    private PageElement newRenderBodyElement()
+    {
+        return _pageElementFactory.newRenderBodyElement(_loadingElement);
+    }
+
     private void addToBody(PageElement element)
     {
         _bodyPageElementStack.peek().addToBody(element);
@@ -241,7 +246,7 @@
 
     private void body(BodyToken token)
     {
-        addRenderBodyElement();
+        addToBody(newRenderBodyElement());
 
         // BODY tokens are *not* matched by END_ELEMENT tokens. Nor will there be
         // text or comment content "inside" the BODY.
@@ -372,7 +377,7 @@
 
         if (template.isMissing())
         {
-            addRenderBodyElement();
+            _loadingElement.addToTemplate(newRenderBodyElement());
             return;
         }
 



Mime
View raw message