Example usage for org.apache.wicket.request Response getContainerResponse

List of usage examples for org.apache.wicket.request Response getContainerResponse

Introduction

In this page you can find the example usage for org.apache.wicket.request Response getContainerResponse.

Prototype

public abstract Object getContainerResponse();

Source Link

Document

Provides access to the low-level container response object that implementaion of this Response delegate to.

Usage

From source file:at.molindo.wicketutils.utils.WicketUtils.java

License:Apache License

public static HttpServletResponse getHttpServletResponse(Response response) {
    Object cr = response != null ? response.getContainerResponse() : null;
    return cr instanceof HttpServletResponse ? (HttpServletResponse) cr : null;
}

From source file:jp.xet.uncommons.wicket.utils.WicketUtil.java

License:Apache License

/**
 * ???{@link HttpServletResponse}?/*from  w  ww. j  a  v  a 2 s . c  o m*/
 * 
 * @return {@link HttpServletResponse}
 * @since 1.0
 */
public static HttpServletResponse getHttpServletResponse() {
    RequestCycle requestCycle = RequestCycle.get();
    if (requestCycle == null) {
        return null;
    }
    Response response = requestCycle.getResponse();
    return (HttpServletResponse) response.getContainerResponse();
}

From source file:org.projectforge.renderer.custom.Formatter.java

License:Open Source License

public Map<String, Object> getData(final List<TimesheetDO> timeSheets, final Integer taskId,
        final Request request, final Response response, final TimesheetFilter actionFilter) {
    return getData(timeSheets, taskId, (HttpServletRequest) request.getContainerRequest(),
            (HttpServletResponse) response.getContainerResponse(), actionFilter);
}

From source file:org.projectforge.web.wicket.DownloadUtils.java

License:Open Source License

public static void setCharacterEncoding(final Response response, final String encoding) {
    final Object cresp = response.getContainerResponse();
    if (cresp instanceof HttpServletResponse) {
        ((HttpServletResponse) cresp).setCharacterEncoding(encoding);
    } else {//from  w w  w  .ja v  a2  s . c om
        log.warn("Character encoding not supported for response of type: " + response.getClass());
    }
}

From source file:org.projectforge.web.wicket.WicketUtils.java

License:Open Source License

public static HttpServletResponse getHttpServletResponse(final Response response) {
    return (HttpServletResponse) response.getContainerResponse();
}

From source file:org.wicketstuff.html5.eventsource.EventSourceResource.java

License:Apache License

public final void respond(final Attributes attributes) {
    Response response = attributes.getResponse();

    HttpServletResponse containerResponse = (HttpServletResponse) response.getContainerResponse();

    EventSource eventSource = new EventSource(containerResponse, attributes.getParameters());

    respond(eventSource);/*w w  w.java 2  s.c  om*/
}