Package org.apache.wicket.request

Examples of org.apache.wicket.request.Response


      // single url), and then "flush" (by writing to the real response) before closing.
      // to support this, we need to allow header contributions to be written in the close
      // tag, which we do here:
      headerRendering = true;
      // save old response, set new
      Response oldResponse = RequestCycle.get().setResponse(encodingHeaderResponse);
      encodingHeaderResponse.reset();

      // now, close the response (which may render things)
      header.getHeaderResponse().close();
View Full Code Here


      final Page page = component.getPage();
      page.addOrReplace(header);
    }

    // save old response, set new
    Response oldResponse = RequestCycle.get().setResponse(encodingHeaderResponse);

    encodingHeaderResponse.reset();

    // render the head of component and all it's children
View Full Code Here

  protected BufferedWebResponse renderPage(Url targetUrl, RequestCycle requestCycle)
  {
    IRequestHandler scheduled = requestCycle.getRequestHandlerScheduledAfterCurrent();

    // keep the original response
    final Response originalResponse = requestCycle.getResponse();

    // buffered web response for page
    BufferedWebResponse response = new BufferedWebResponse((WebResponse)originalResponse);

    // keep the original base URL
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Response setResponse(final Response response)
  {
    Response current = activeResponse;
    activeResponse = response;
    return current;
  }
View Full Code Here

  {

    @Override
    protected void respond(IRequestHandler handler)
    {
      Response originalResponse = getResponse();
      try
      {
        handler.respond(RequestCycle.this);
      }
      finally
View Full Code Here

     * @param stream
     *            input stream
     */
    protected final void writeStream(Attributes attributes, InputStream stream)
    {
      final Response response = attributes.getResponse();
      OutputStream s = new OutputStream()
      {
        @Override
        public void write(int b) throws IOException
        {
          response.write(new byte[] { (byte)b });
        }

        @Override
        public void write(byte[] b) throws IOException
        {
          response.write(b);
        }

        @Override
        public void write(byte[] b, int off, int len) throws IOException
        {
View Full Code Here

    super.afterRender(component);

    // Append the span and img icon right after the rendering of the
    // component. Not as pretty as working with a panel etc, but works
    // for behaviors and is more efficient
    Response response = component.getResponse();
    response.write("\n<span class=\"yui-skin-sam\">&nbsp;<span style=\"");

    if (renderOnLoad())
    {
      response.write("display:block;");
    }
    else
    {
      response.write("display:none;");
      response.write("position:absolute;");
    }

    response.write("z-index: 99999;\" id=\"");
    response.write(getEscapedComponentMarkupId());
    response.write("Dp\"></span><img style=\"");
    response.write(getIconStyle());
    response.write("\" id=\"");
    response.write(getIconId());
    response.write("\" src=\"");
    CharSequence iconUrl = getIconUrl();
    response.write(Strings.escapeMarkup(iconUrl != null ? iconUrl.toString() : ""));
    response.write("\" alt=\"");
    CharSequence alt = getIconAltText();
    response.write(Strings.escapeMarkup((alt != null) ? alt.toString() : ""));
    response.write("\" title=\"");
    CharSequence title = getIconTitle();
    response.write(Strings.escapeMarkup((title != null) ? title.toString() : ""));
    response.write("\"/>");

    if (renderOnLoad())
    {
      response.write("<br style=\"clear:left;\"/>");
    }
    response.write("</span>");
  }
View Full Code Here

*/
public abstract class BaseRequestHandlerStackTest extends TestCase
{
  protected Response newResponse()
  {
    return new Response()
    {
      @Override
      public void write(byte[] array)
      {
      }
View Full Code Here

    return new RequestHandlerStack()
    {
      @Override
      protected void respond(IRequestHandler handler)
      {
        Response originalResponse = requestCycle.getResponse();
        try
        {
          handler.respond(requestCycle);
        }
        finally
View Full Code Here

      return response;
    }

    public Response setResponse(Response response)
    {
      Response original = this.response;
      this.response = response;
      return original;
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.Response

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.