Package org.apache.wicket.request

Examples of org.apache.wicket.request.Response$StreamAdapter


  }


  private RequestCycle newRequestCycle(final boolean throwExceptionInRespond)
  {
    final Response originalResponse = newResponse();
    Request request = new MockWebRequest(Url.parse("http://wicket.apache.org"));
    handler = new IRequestHandler()
    {
      public void respond(IRequestCycle requestCycle)
      {
View Full Code Here


        return ret == null ? "" : ret;
      }
    };
    AtmosphereWebRequest request = new AtmosphereWebRequest(application.newWebRequest(
      httpRequest, filterPath), pageKey, subscriptionsForPage, event);
    Response response = new AtmosphereWebResponse(resource.getResponse());
    if (application.createRequestCycle(request, response).processRequestAndDetach())
      broadcaster.broadcast(response.toString(), resource);
  }
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
        {
          response.write(b, off, len);
        }
      };
      try
      {
        Streams.copy(stream, s);
View Full Code Here

    final PageRenderer pageRenderer = getApplication().getPageRendererProvider().get(handler);

    RequestCycle requestCycle = getRequestCycle();

    final Response oldResponse = requestCycle.getResponse();
    BufferedWebResponse tempResponse = new BufferedWebResponse(null);

    try
    {
      requestCycle.setResponse(tempResponse);
View Full Code Here

   */
  private CharSequence renderPanel(final Panel panel)
  {
    RequestCycle requestCycle = getRequestCycle();

    final Response oldResponse = requestCycle.getResponse();
    BufferedWebResponse tempResponse = new BufferedWebResponse(null);

    try
    {
      requestCycle.setResponse(tempResponse);
View Full Code Here

      }
    };
    AtmosphereWebRequest request = new AtmosphereWebRequest(
      (ServletWebRequest)application.newWebRequest(httpRequest, filterPath), pageKey,
      subscriptionsForPage, event);
    Response response = new AtmosphereWebResponse(resource.getResponse());
    if (application.createRequestCycle(request, response).processRequestAndDetach())
      getBroadcaster().broadcast(response.toString(), resource);
  }
View Full Code Here

   * @param attributes
   *            request attributes
   */
  protected void configureCache(final ResourceResponse data, final Attributes attributes)
  {
    Response response = attributes.getResponse();

    if (response instanceof WebResponse)
    {
      Duration duration = data.getCacheDuration();
      WebResponse webResponse = (WebResponse)response;
View Full Code Here

   * @param data
   * @param attributes
   */
  protected void setResponseHeaders(final ResourceResponse data, final Attributes attributes)
  {
    Response response = attributes.getResponse();
    if (response instanceof WebResponse)
    {
      WebResponse webResponse = (WebResponse)response;

      // 1. Last Modified
View Full Code Here

     * @param stream
     *            input stream
     */
    protected final void writeStream(Attributes attributes, InputStream stream) throws IOException
    {
      final Response response = attributes.getResponse();
      Streams.copy(stream, response.getOutputStream());
    }
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

TOP

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

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.