Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.0
    • Component/s: None
    • Labels:
      None

      Description

      If there is not a component in Zone fire a heart beat event, the forced attributes would not return to the client, although the page would fire this event at the end.

        Issue Links

          Activity

          mindhawk created issue -
          Hide
          Howard M. Lewis Ship added a comment -

          An obvious workaround would be to include, in the body of the Zone, a non-rendering component that starts and ends a heartbeat.

          Show
          Howard M. Lewis Ship added a comment - An obvious workaround would be to include, in the body of the Zone, a non-rendering component that starts and ends a heartbeat.
          Hide
          Seth Call added a comment -

          Just spent a few hours debugging this one.

          A mixin that one could add to a Zone would work too, no?

          Show
          Seth Call added a comment - Just spent a few hours debugging this one. A mixin that one could add to a Zone would work too, no?
          Hide
          Seth Call added a comment -

          /** The following is a workaround for this issue */

          import org.apache.tapestry5.annotations.*;
          import org.apache.tapestry5.corelib.components.Zone;
          import org.apache.tapestry5.ioc.annotations.Inject;
          import org.apache.tapestry5.services.Heartbeat;
          import org.apache.tapestry5.services.Request;

          /** Place on zones sent back in Ajax to fix https://issues.apache.org/jira/browse/TAP5-940 */
          public class BmBm {

          @Environmental
          private Heartbeat heartbeat;

          @InjectContainer
          private Zone zone;

          @Inject
          private Request request;

          @BeginRender
          public void beginRender() {
          if (request.isXHR())

          { heartbeat.begin(); }

          }

          @AfterRender
          public void afterRender() {
          if (request.isXHR())

          { heartbeat.end(); }

          }

          Show
          Seth Call added a comment - /** The following is a workaround for this issue */ import org.apache.tapestry5.annotations.*; import org.apache.tapestry5.corelib.components.Zone; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Heartbeat; import org.apache.tapestry5.services.Request; /** Place on zones sent back in Ajax to fix https://issues.apache.org/jira/browse/TAP5-940 */ public class BmBm { @Environmental private Heartbeat heartbeat; @InjectContainer private Zone zone; @Inject private Request request; @BeginRender public void beginRender() { if (request.isXHR()) { heartbeat.begin(); } } @AfterRender public void afterRender() { if (request.isXHR()) { heartbeat.end(); } }
          Hide
          mindhawk added a comment -

          I have tried this, but I found that if I return zone from a event handler, everything is ok except there is another dive inside the previous one. But if I return zone.getBody(), the heartbeat mixin the zone sames does not work.

          So, I have write another Zone component myself:
          <div t:id="zone" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
          <div t:id="heartbeat">
          <t:body/>
          </div>
          </div>

          It is works fine. The "heartbeat" component is a non-rendering component which only fire a heartbeat event

          Show
          mindhawk added a comment - I have tried this, but I found that if I return zone from a event handler, everything is ok except there is another dive inside the previous one. But if I return zone.getBody(), the heartbeat mixin the zone sames does not work. So, I have write another Zone component myself: <div t:id="zone" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <div t:id="heartbeat"> <t:body/> </div> </div> It is works fine. The "heartbeat" component is a non-rendering component which only fire a heartbeat event
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Howard M. Lewis Ship added a comment -

          There was already a Heartbeat in place for the partial page render

          Show
          Howard M. Lewis Ship added a comment - There was already a Heartbeat in place for the partial page render
          Howard M. Lewis Ship made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.2.0 [ 12314122 ]
          Resolution Fixed [ 1 ]
          Jochen Kemnade made changes -
          Link This issue breaks TAP5-2500 [ TAP5-2500 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          114d 21h 55m 1 Howard M. Lewis Ship 26/Mar/10 23:55
          In Progress In Progress Closed Closed
          1h 29m 1 Howard M. Lewis Ship 27/Mar/10 01:24

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              mindhawk
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development