/** * @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle) */ public void respond(RequestCycle requestCycle) { requestCycle.getResponse().write("<ajax-response></ajax-response>"); }
/** * Convenience method to get the http response. * * @return WebResponse related to the RequestCycle */ private WebResponse getWebResponse() { return (WebResponse)RequestCycle.get().getResponse(); }
/** * Convenience method to get the http response. * * @return WebResponse related to the RequestCycle */ private WebResponse getWebResponse() { return (WebResponse)RequestCycle.get().getResponse(); }
protected Response getRealResponse() { return RequestCycle.get().getResponse(); } };
/** * @return The response for this component's active request cycle */ public final Response getResponse() { return getRequestCycle().getResponse(); }
/** * * @see org.apache.wicket.markup.html.internal.HeaderResponse#getRealResponse() */ @Override protected Response getRealResponse() { return RequestCycle.get().getResponse(); } };
/** * @return The response for this component's active request cycle */ public final Response getResponse() { return getRequestCycle().getResponse(); }
/** * Construct. */ public AbstractRestartResponseException() { RequestCycle rc = RequestCycle.get(); if (rc != null) { rc.getResponse().reset(); } } }
/** * Construct. */ public AbstractRestartResponseException() { RequestCycle rc = RequestCycle.get(); if (rc != null) { rc.getResponse().reset(); } } }
public void renderAfter(Component component) { RequestCycle.get().getResponse().write("</td>"); }
@Override public void renderJavascript(final CharSequence javascript, final String id) { if (javascript == null) { throw new IllegalArgumentException("javascript cannot be null"); } List<Object> token = Arrays.asList(new Object[]{javascript.toString(), id}); if (wasRendered(token) == false) { JavascriptUtils.writeJavascript(RequestCycle.get().getResponse(), javascript, id); markRendered(token); } }
public void renderAfter(Component component) { RequestCycle.get().getResponse().write("</td>"); }
@Override public void renderString(final CharSequence string) { if (string == null) { throw new IllegalArgumentException("string cannot be null"); } String token = string.toString(); if (wasRendered(token) == false) { RequestCycle.get().getResponse().write(string); markRendered(token); } }
/** * Constructor * * @param page */ public AjaxRequestTarget(Page page) { this.page = page; Response response = RequestCycle.get().getResponse(); encodingBodyResponse = new AjaxResponse(response); encodingHeaderResponse = new AjaxResponse(response); }
/** * Constructor * * @param page */ public AjaxRequestTarget(Page page) { this.page = page; Response response = RequestCycle.get().getResponse(); encodingBodyResponse = new AjaxResponse(response); encodingHeaderResponse = new AjaxResponse(response); }
public String getUrl() { String docUrl = "binaries" + path; String url; if (selectedResourceDefinition != null) { url = RichTextUtil.encode(docUrl + "/" + selectedResourceDefinition); } else { url = RichTextUtil.encode(docUrl); } url = RequestCycle.get().getResponse().encodeURL(url).toString(); return RichTextUtil.encodeResourceURL(url); }
@Override public void close() { super.close(); Response realResponse = RequestCycle.get().getResponse(); CharSequence output = bufferedResponse.getBuffer(); if (output.length() > 0) { realResponse.write(output); } bufferedResponse.reset(); }
@Override public void close() { // write the stuff that was actually supposed to be in the header to the // response, which is used by the built-in HtmlHeaderContainer to get // its contents CharSequence headerContent = getContent(headerFilterName); RequestCycle.get().getResponse().write(headerContent); // must make sure our super (and with it, the wrapped response) get closed: super.close(); }
public CharSequence execute() { final int originalStreamPos = stream.getCurrentIndex(); final Response original = cycle.getResponse(); final StringResponse buffer = new StringResponse(); cycle.setResponse(buffer); try { executeInsideBufferedZone(); return buffer.getBuffer(); } finally { cycle.setResponse(original); stream.setCurrentIndex(originalStreamPos); } }
public void respond(RequestCycle requestCycle) { try { HttpServletRequest request = new CocoonWicketRequestWrapper(((WebRequest) requestCycle.getRequest()) .getHttpServletRequest()); this.requestProcessor.service(request, ((WebResponse) requestCycle.getResponse()).getHttpServletResponse()); } catch (NoMatchingPipelineException e) { WebApplication.get().getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); RequestCycle.get().setRequestTarget(new WebErrorCodeResponseTarget(404)); } catch (Exception e) { throw new CocoonRuntimeException("Error occurred while executing a Cocoon sitemap.", e); } }