Examples of StringResponse


Examples of org.apache.wicket.response.StringResponse

   *
   * @return Response object. Must not be null
   */
  protected Response newResponse()
  {
    return new StringResponse();
  }
View Full Code Here

Examples of org.apache.wicket.response.StringResponse

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

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

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

      // Render all header sections of all components on the page
      renderHeaderSections(getPage(), this);

      // Automatically add <head> if necessary
      CharSequence output = response.getBuffer();
      if (output.length() > 0)
      {
        if (output.charAt(0) == '\r')
        {
          for (int i = 2; i < output.length(); i += 2)
View Full Code Here

Examples of org.apache.wicket.response.StringResponse

           */
          @Override
          public void respond(RequestCycle requestCycle)
          {
            if (requestParams.getString("email") != null) {
              final StringResponse emailResponse = new StringResponse();
              final WebResponse originalResponse = (WebResponse)RequestCycle.get().getResponse();
              RequestCycle.get().setResponse(emailResponse);
              super.respond(requestCycle);
              // Here send the email instead of dumping it to stdout!
              System.out.println(emailResponse.toString());
              RequestCycle.get().setResponse(originalResponse);
              RequestCycle.get().setRequestTarget(new BookmarkablePageRequestTarget(Sent.class));
            } else {
              super.respond(requestCycle);
            }
View Full Code Here

Examples of org.apache.wicket.response.StringResponse

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

    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);

      // Render all header sections of all components on the page
      renderHeaderSections(getPage(), this);
      getHeaderResponse().close();

      // Automatically add <head> if necessary
      CharSequence output = response.getBuffer();
      if (output.length() > 0)
      {
        if (output.charAt(0) == '\r')
        {
          for (int i = 2; i < output.length(); i += 2)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.