Package org.apache.wicket.markup.html

Examples of org.apache.wicket.markup.html.IHeaderResponse


      if (log.isDebugEnabled())
      {
        log.debug("renderHead: " + toString(false));
      }

      IHeaderResponse response = container.getHeaderResponse();

      // Allow component to contribute
      if (response.wasRendered(this) == false)
      {
        // Make sure the markup source strategy contributes to the header first
        // to be backward compatible. WICKET-3761
        getMarkupSourcingStrategy().renderHead(this, container);

        // Then let the component itself to contribute to the header
        renderHead(this, response);

        response.markRendered(this);
      }

      // Than ask all behaviors
      for (Behavior behavior : getBehaviors())
      {
        if (isBehaviorAccepted(behavior))
        {
          if (response.wasRendered(behavior) == false)
          {
            behavior.renderHead(this, response);
            List<IClusterable> pair = Arrays.asList(this, behavior);
            response.markRendered(pair);
          }
        }
      }
    }
  }
View Full Code Here


    {
      // Create a (string) response for all headers contributed by any component on the Page.
      final StringResponse response = new StringResponse();
      getRequestCycle().setResponse(response);

      IHeaderResponse headerResponse = getHeaderResponse();
      if (!response.equals(headerResponse.getResponse()))
      {
        getRequestCycle().setResponse(headerResponse.getResponse());
      }

      // Render the header sections of all components on the page
      AbstractHeaderRenderStrategy.get().renderHeader(this, getPage());

      // Close the header response before rendering the header container itself
      // See https://issues.apache.org/jira/browse/WICKET-3728
      headerResponse.close();

      // Create a separate (string) response for the header container itself
      final StringResponse bodyResponse = new StringResponse();
      getRequestCycle().setResponse(bodyResponse);
View Full Code Here

    try
    {
      final StringResponse response = new StringResponse();
      getRequestCycle().setResponse(response);

      IHeaderResponse headerResponse = getHeaderResponse();
      if (!response.equals(headerResponse.getResponse()))
      {
        getRequestCycle().setResponse(headerResponse.getResponse());
      }

      // In any case, first render the header section directly associated
      // with the markup
      super.onComponentTagBody(markupStream, openTag);
View Full Code Here

   *
   * @return new header response
   */
  protected IHeaderResponse newHeaderResponse()
  {
    IHeaderResponse headerResponse = RequestContext.get().getHeaderResponse();
    if (headerResponse == null)
    {
      // no (portlet) headerResponse override, create a default one
      headerResponse = new HeaderResponse()
      {
View Full Code Here

   *            the response Wicket created
   * @return the response Wicket should use in IHeaderContributor traversal
   */
  public final IHeaderResponse decorateHeaderResponse(IHeaderResponse response)
  {
    IHeaderResponse hr = headerResponseDecorator == null ? response
      : headerResponseDecorator.decorate(response);
    notifyRenderHeadListener(hr);
    return hr;
  }
View Full Code Here

      if (log.isDebugEnabled())
      {
        log.debug("renderHead: " + toString(false));
      }

      IHeaderResponse response = container.getHeaderResponse();

      // Allow component to contribute
      if (response.wasRendered(this) == false)
      {
        // Make sure the markup source strategy contributes to the header first
        // to be backward compatible. WICKET-3761
        getMarkupSourcingStrategy().renderHead(this, container);

        // Then let the component itself to contribute to the header
        renderHead(this, response);

        response.markRendered(this);
      }

      // Than ask all behaviors
      for (Behavior behavior : getBehaviors())
      {
        if (isBehaviorAccepted(behavior))
        {
          if (response.wasRendered(behavior) == false)
          {
            behavior.renderHead(this, response);
            response.markRendered(behavior);
          }
        }
      }
    }
  }
View Full Code Here

      if (log.isDebugEnabled())
      {
        log.debug("renderHead: " + toString(false));
      }

      IHeaderResponse response = container.getHeaderResponse();

      // Allow component to contribute
      if (response.wasRendered(this) == false)
      {
        // Make sure the markup source strategy contributes to the header first
        // to be backward compatible. WICKET-3761
        getMarkupSourcingStrategy().renderHead(this, container);

        // Then let the component itself to contribute to the header
        renderHead(this, response);

        response.markRendered(this);
      }

      // Than ask all behaviors
      for (Behavior behavior : getBehaviors())
      {
        if (isBehaviorAccepted(behavior))
        {
          if (response.wasRendered(behavior) == false)
          {
            behavior.renderHead(this, response);
            response.markRendered(behavior);
          }
        }
      }
    }
  }
View Full Code Here

      if (log.isDebugEnabled())
      {
        log.debug("renderHead: " + toString(false));
      }

      IHeaderResponse response = container.getHeaderResponse();

      // Allow component to contribute
      if (response.wasRendered(this) == false)
      {
        // Let the component contribute something to the header
        renderHead(response);

        // Make sure the markup source strategy has been considered as well.
        getMarkupSourcingStrategy().renderHead(this, container);

        response.markRendered(this);
      }

      // Than ask all behaviors
      for (Behavior behavior : getBehaviors())
      {
        if (isBehaviorAccepted(behavior))
        {
          if (response.wasRendered(behavior) == false)
          {
            behavior.renderHead(this, response);
            response.markRendered(behavior);
          }
        }
      }
    }
  }
View Full Code Here

      if (log.isDebugEnabled())
      {
        log.debug("renderHead: " + toString(false));
      }

      IHeaderResponse response = container.getHeaderResponse();

      // Allow component to contribute
      if (response.wasRendered(this) == false)
      {
        // Make sure the markup source strategy contributes to the header first
        // to be backward compatible. WICKET-3761
        getMarkupSourcingStrategy().renderHead(this, container);

        // Then let the component itself to contribute to the header
        renderHead(this, response);

        response.markRendered(this);
      }

      // Than ask all behaviors
      for (Behavior behavior : getBehaviors())
      {
        if (isBehaviorAccepted(behavior))
        {
          if (response.wasRendered(behavior) == false)
          {
            behavior.renderHead(this, response);
            response.markRendered(behavior);
          }
        }
      }
    }
  }
View Full Code Here

    try
    {
      final StringResponse response = new StringResponse();
      getRequestCycle().setResponse(response);

      IHeaderResponse headerResponse = getHeaderResponse();
      if (!response.equals(headerResponse.getResponse()))
      {
        getRequestCycle().setResponse(headerResponse.getResponse());
      }

      // In any case, first render the header section directly associated
      // with the markup
      super.onComponentTagBody(markupStream, openTag);
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.IHeaderResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.