You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Denis Delangle (JIRA)" <ji...@apache.org> on 2010/04/07 15:17:33 UTC

[jira] Created: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

On ajax request, template body doesn't render if page is new in pagepool or if server restarted
-----------------------------------------------------------------------------------------------

                 Key: TAP5-1100
                 URL: https://issues.apache.org/jira/browse/TAP5-1100
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: Denis Delangle
            Priority: Critical


Bug process :
 * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
 * Start jetty, open the page
 * Restart jetty, submit the ajax form
-> The form is refreshed without the body of the component

Attached to the ticket, a little project showing the problem (just open the index page and click submit)

The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.

We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.

A patch that could fix it (didn't test it) :

Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
===================================================================
--- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
+++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
@@ -834,7 +834,9 @@
     public void enqueueBeforeRenderBody(RenderQueue queue)
     {
         // If no body, then no beforeRenderBody or afterRenderBody
-
+    	if(! renderPhasesInitalized) 
+    		initializeRenderPhases();
+    		
         if (bodyBlock != null)
             push(queue, beforeRenderBodyPhase);
     }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

Posted by "Denis Delangle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denis Delangle updated TAP5-1100:
---------------------------------

    Attachment: ajaxbody.zip

Little tapestry 5 project created from archetype demonstrating the bug (index page)

> On ajax request, template body doesn't render if page is new in pagepool or if server restarted
> -----------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1100
>                 URL: https://issues.apache.org/jira/browse/TAP5-1100
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Denis Delangle
>            Priority: Critical
>         Attachments: ajaxbody.zip
>
>
> Bug process :
>  * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
>  * Start jetty, open the page
>  * Restart jetty, submit the ajax form
> -> The form is refreshed without the body of the component
> Attached to the ticket, a little project showing the problem (just open the index page and click submit)
> The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.
> We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.
> A patch that could fix it (didn't test it) :
> Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
> ===================================================================
> --- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
> +++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
> @@ -834,7 +834,9 @@
>      public void enqueueBeforeRenderBody(RenderQueue queue)
>      {
>          // If no body, then no beforeRenderBody or afterRenderBody
> -
> +    	if(! renderPhasesInitalized) 
> +    		initializeRenderPhases();
> +    		
>          if (bodyBlock != null)
>              push(queue, beforeRenderBodyPhase);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1100.
--------------------------------------

    Fix Version/s: 5.2.0
       Resolution: Fixed

> On ajax request, template body doesn't render if page is new in pagepool or if server restarted
> -----------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1100
>                 URL: https://issues.apache.org/jira/browse/TAP5-1100
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Denis Delangle
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>             Fix For: 5.2.0
>
>         Attachments: ajaxbody.zip
>
>
> Bug process :
>  * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
>  * Start jetty, open the page
>  * Restart jetty, submit the ajax form
> -> The form is refreshed without the body of the component
> Attached to the ticket, a little project showing the problem (just open the index page and click submit)
> The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.
> We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.
> A patch that could fix it (didn't test it) :
> Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
> ===================================================================
> --- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
> +++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
> @@ -834,7 +834,9 @@
>      public void enqueueBeforeRenderBody(RenderQueue queue)
>      {
>          // If no body, then no beforeRenderBody or afterRenderBody
> -
> +    	if(! renderPhasesInitalized) 
> +    		initializeRenderPhases();
> +    		
>          if (bodyBlock != null)
>              push(queue, beforeRenderBodyPhase);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1100.
--------------------------------------

    Fix Version/s: 5.2.0
       Resolution: Fixed

> On ajax request, template body doesn't render if page is new in pagepool or if server restarted
> -----------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1100
>                 URL: https://issues.apache.org/jira/browse/TAP5-1100
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Denis Delangle
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>             Fix For: 5.2.0
>
>         Attachments: ajaxbody.zip
>
>
> Bug process :
>  * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
>  * Start jetty, open the page
>  * Restart jetty, submit the ajax form
> -> The form is refreshed without the body of the component
> Attached to the ticket, a little project showing the problem (just open the index page and click submit)
> The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.
> We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.
> A patch that could fix it (didn't test it) :
> Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
> ===================================================================
> --- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
> +++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
> @@ -834,7 +834,9 @@
>      public void enqueueBeforeRenderBody(RenderQueue queue)
>      {
>          // If no body, then no beforeRenderBody or afterRenderBody
> -
> +    	if(! renderPhasesInitalized) 
> +    		initializeRenderPhases();
> +    		
>          if (bodyBlock != null)
>              push(queue, beforeRenderBodyPhase);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-1100:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> On ajax request, template body doesn't render if page is new in pagepool or if server restarted
> -----------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1100
>                 URL: https://issues.apache.org/jira/browse/TAP5-1100
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Denis Delangle
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>         Attachments: ajaxbody.zip
>
>
> Bug process :
>  * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
>  * Start jetty, open the page
>  * Restart jetty, submit the ajax form
> -> The form is refreshed without the body of the component
> Attached to the ticket, a little project showing the problem (just open the index page and click submit)
> The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.
> We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.
> A patch that could fix it (didn't test it) :
> Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
> ===================================================================
> --- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
> +++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
> @@ -834,7 +834,9 @@
>      public void enqueueBeforeRenderBody(RenderQueue queue)
>      {
>          // If no body, then no beforeRenderBody or afterRenderBody
> -
> +    	if(! renderPhasesInitalized) 
> +    		initializeRenderPhases();
> +    		
>          if (bodyBlock != null)
>              push(queue, beforeRenderBodyPhase);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-1100:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> On ajax request, template body doesn't render if page is new in pagepool or if server restarted
> -----------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1100
>                 URL: https://issues.apache.org/jira/browse/TAP5-1100
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Denis Delangle
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>         Attachments: ajaxbody.zip
>
>
> Bug process :
>  * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
>  * Start jetty, open the page
>  * Restart jetty, submit the ajax form
> -> The form is refreshed without the body of the component
> Attached to the ticket, a little project showing the problem (just open the index page and click submit)
> The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.
> We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.
> A patch that could fix it (didn't test it) :
> Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
> ===================================================================
> --- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
> +++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
> @@ -834,7 +834,9 @@
>      public void enqueueBeforeRenderBody(RenderQueue queue)
>      {
>          // If no body, then no beforeRenderBody or afterRenderBody
> -
> +    	if(! renderPhasesInitalized) 
> +    		initializeRenderPhases();
> +    		
>          if (bodyBlock != null)
>              push(queue, beforeRenderBodyPhase);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1100) On ajax request, template body doesn't render if page is new in pagepool or if server restarted

Posted by "Denis Delangle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denis Delangle updated TAP5-1100:
---------------------------------

    Attachment: ajaxbody.zip

Little tapestry 5 project created from archetype demonstrating the bug (index page)

> On ajax request, template body doesn't render if page is new in pagepool or if server restarted
> -----------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1100
>                 URL: https://issues.apache.org/jira/browse/TAP5-1100
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Denis Delangle
>            Priority: Critical
>         Attachments: ajaxbody.zip
>
>
> Bug process :
>  * Write a component using ajax form and a <t:body />. When form is submitted in ajax, the component renders its body.
>  * Start jetty, open the page
>  * Restart jetty, submit the ajax form
> -> The form is refreshed without the body of the component
> Attached to the ticket, a little project showing the problem (just open the index page and click submit)
> The problem is in ComponentPageElementImpl, the beforeRenderBodyPhase should be called for the part of Index template inside my component, but as the page has never been rendered before, beforeRenderBodyPhase is null.
> We have the same issue if a new page instance is created to treat the ajax request. If the page is taken from the page pool, then there is no problem as the page has already been initialized.
> A patch that could fix it (didn't test it) :
> Index: src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
> ===================================================================
> --- src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(revision 931530)
> +++ src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java	(working copy)
> @@ -834,7 +834,9 @@
>      public void enqueueBeforeRenderBody(RenderQueue queue)
>      {
>          // If no body, then no beforeRenderBody or afterRenderBody
> -
> +    	if(! renderPhasesInitalized) 
> +    		initializeRenderPhases();
> +    		
>          if (bodyBlock != null)
>              push(queue, beforeRenderBodyPhase);
>      }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.