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

          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
          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
          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
          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
          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.

            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