Examples of MimeResponse


Examples of javax.portlet.MimeResponse

    RequestContext context = getRequestContext();
    ExternalContext externalContext = context.getExternalContext();
    View view = getView();
    PortletContext portletContext = (PortletContext) externalContext.getNativeContext();
    PortletRequest request = (PortletRequest) externalContext.getNativeRequest();
    MimeResponse response = (MimeResponse) externalContext.getNativeResponse();
    if (response.getContentType() == null) {
      // No Portlet content type specified yet -> use the view-determined type.
      // (The Portlet spec requires the content type to be set on the RenderResponse)
      String contentType = view.getContentType();
      if (contentType != null) {
        response.setContentType(contentType);
      }
    }
    request.setAttribute(ViewRendererServlet.VIEW_ATTRIBUTE, view);
    request.setAttribute(ViewRendererServlet.MODEL_ATTRIBUTE, model);
    request.setAttribute(org.springframework.web.servlet.support.RequestContext.WEB_APPLICATION_CONTEXT_ATTRIBUTE,
View Full Code Here

Examples of javax.portlet.MimeResponse

    final String viewId = facesContext.getViewRoot().getViewId();
    final String formAction = externalContext.encodeActionURL(viewHandler.getActionURL(facesContext, viewId));
    final String partialAction;
    final boolean portlet = PortletUtils.isPortletApiAvailable() && response instanceof MimeResponse;
    if (portlet) {
      final MimeResponse mimeResponse = (MimeResponse) response;
      final ResourceURL resourceURL = mimeResponse.createResourceURL();
      partialAction = externalContext.encodeResourceURL(resourceURL.toString());
    } else {
      partialAction = null;
    }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public void flushBuffer() throws IOException {
    if (!(_portletResponse instanceof MimeResponse)) {
      throw new UnsupportedOperationException();
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    mimeResponse.flushBuffer();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public int getBufferSize() {
    if (!(_portletResponse instanceof ClientDataRequest)) {
      return 0;
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    return mimeResponse.getBufferSize();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public String getCharacterEncoding() {
    if (!(_portletResponse instanceof MimeResponse)) {
      return null;
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    return mimeResponse.getCharacterEncoding();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public String getContentType() {
    if (!(_portletResponse instanceof MimeResponse)) {
      return null;
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    return mimeResponse.getContentType();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public PrintWriter getWriter() throws IOException {
    if (!(_portletResponse instanceof MimeResponse)) {
      throw new UnsupportedOperationException();
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    return mimeResponse.getWriter();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public boolean isCommitted() {
    if (!(_portletResponse instanceof MimeResponse)) {
      return true;
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    return mimeResponse.isCommitted();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public void reset() {
    if (!(_portletResponse instanceof MimeResponse)) {
      throw new UnsupportedOperationException();
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    mimeResponse.reset();
  }
View Full Code Here

Examples of javax.portlet.MimeResponse

  public void resetBuffer() {
    if (!(_portletResponse instanceof MimeResponse)) {
      throw new UnsupportedOperationException();
    }

    MimeResponse mimeResponse = (MimeResponse)_portletResponse;

    mimeResponse.resetBuffer();
  }
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.