Package org.apache.wicket

Examples of org.apache.wicket.Response


    component.setOutputMarkupId(true);

    // substitute our encoding response for the real one so we can capture
    // component's markup in a manner safe for transport inside CDATA block
    final Response originalResponse = response;
    encodingBodyResponse.reset();
    RequestCycle.get().setResponse(encodingBodyResponse);

    // Initialize temporary variables
    final Page page = component.getPage();
View Full Code Here


        component.getPage().add(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

    }

    // if resource is still null, it doesn't exist
    if (resource == null)
    {
      Response response = requestCycle.getResponse();
      if (response instanceof WebResponse)
      {
        ((WebResponse)response).getHttpServletResponse().setStatus(
          HttpServletResponse.SC_NOT_FOUND);
        log.error("shared resource " + resourceKey + " not found");
View Full Code Here

    {
      // we're in an ajax request, so we don't filter and separate stuff....
      runnable.run();
      return;
    }
    Response original = RequestCycle.get().setResponse(response);
    try
    {
      runnable.run();
    }
    catch (RuntimeException ex)
View Full Code Here

   * @param page
   */
  public AjaxRequestTarget(Page page)
  {
    this.page = page;
    Response response = RequestCycle.get().getResponse();
    encodingBodyResponse = new AjaxResponse(response);
    encodingHeaderResponse = new AjaxResponse(response);
  }
View Full Code Here

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

    component.setOutputMarkupId(true);

    // substitute our encoding response for the real one so we can capture
    // component's markup in a manner safe for transport inside CDATA block
    final Response originalResponse = response;
    encodingBodyResponse.reset();
    RequestCycle.get().setResponse(encodingBodyResponse);

    // Initialize temporary variables
    final Page page = component.findParent(Page.class);
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

  public void onRendered(Component component) {
    super.onRendered(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=\"\"/>");
    if (renderOnLoad()) {
      response.write("<br style=\"clear:left;\"/>");
    }
    response.write("</span>");
  }
View Full Code Here

          if ((element instanceof ComponentTag) && !markupStream.atCloseTag())
          {
            String id = ((ComponentTag)element).getId();

            // Temporarily replace the web response with a String response
            final Response webResponse = getResponse();

            try
            {
              final StringResponse response = new StringResponse();
              getRequestCycle().setResponse(response);
View Full Code Here

TOP

Related Classes of org.apache.wicket.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.