Search in sources :

Example 1 with Headers

use of com.github.bordertech.wcomponents.Headers in project wcomponents by BorderTech.

the class AjaxPageShellInterceptor method preparePaint.

/**
 * Override to set the content type of the response and reset the headers.
 *
 * @param request The request being serviced.
 */
@Override
public void preparePaint(final Request request) {
    UIContext uic = UIContextHolder.getCurrent();
    Headers headers = uic.getUI().getHeaders();
    headers.reset();
    headers.setContentType(WebUtilities.CONTENT_TYPE_XML);
    super.preparePaint(request);
}
Also used : UIContext(com.github.bordertech.wcomponents.UIContext) Headers(com.github.bordertech.wcomponents.Headers)

Example 2 with Headers

use of com.github.bordertech.wcomponents.Headers in project wcomponents by BorderTech.

the class HeadLineInterceptor method preparePaint.

/**
 * Override preparePaint in order to perform processing specific to this interceptor. Any old headers are cleared
 * out before preparePaint is called on the main UI.
 *
 * @param request the request being responded to.
 */
@Override
public void preparePaint(final Request request) {
    // Headers
    // The WHeaders comes from the root WComponent and is a
    // mechanism for WComponents to add their own headers
    // (eg more JavaScript references).
    Headers headers = this.getUI().getHeaders();
    headers.reset();
    super.preparePaint(request);
}
Also used : Headers(com.github.bordertech.wcomponents.Headers)

Example 3 with Headers

use of com.github.bordertech.wcomponents.Headers in project wcomponents by BorderTech.

the class PageShellInterceptor method preparePaint.

/**
 * Override preparePaint in order to prepare the headers.
 *
 * @param request the request being responded to.
 */
@Override
public void preparePaint(final Request request) {
    Headers headers = this.getUI().getHeaders();
    headers.reset();
    headers.setContentType(WebUtilities.CONTENT_TYPE_XML);
    super.preparePaint(request);
}
Also used : Headers(com.github.bordertech.wcomponents.Headers)

Aggregations

Headers (com.github.bordertech.wcomponents.Headers)3 UIContext (com.github.bordertech.wcomponents.UIContext)1