|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.portlet.filter.PortletResponseWrapper
com.liferay.faces.bridge.filter.MimeResponseWrapper
com.liferay.faces.bridge.application.view.BridgeWriteBehindResponseMimeImpl
public class BridgeWriteBehindResponseMimeImpl
Section 7.5.2 of the JSF specification requires that JSP-based views have the ability to interleave native HTML
markup with the markup generated by JSF component. But as described in Section 6.2.1 of the Portlet Bridge Spec,
there is no standard way of supporting this in the JSF API. However, the Portlet Bridge Spec however requires that
one part of the interleaving process be supported by the bridge, specifically Bridge.AFTER_VIEW_CONTENT. This
feature is responsible for rendering of markup that appears after the closing component tag.
The Portlet Bridge Spec requires that the Bridge.AFTER_VIEW_CONTENT feature be supported by implementing
the BridgeWriteBehindResponse interface. However with it is possible to have the JSF implementation (Mojarra
or MyFaces) handle the entire interleaving process by itself. So although this class implements the BridgeWriteBehindResponse interface, it only does so for the sake of completeness. The corresponding methods
implemented in this class throw UnsupportedOperationException which is OK since they will never be
called.
In order to have the JSF implementation handle the entire interleaving process by itself, it is necessary to
overcome some Servlet API dependencies. As part of this mechanism, the getPortletOutputStream() and getWriter() methods in this class delegate writing of the response to the underlying ServletResponse.
| Field Summary | |
|---|---|
static String |
AFTER_VIEW_CONTENT_RESPONSE
|
| Fields inherited from interface javax.portlet.MimeResponse |
|---|
CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT |
| Constructor Summary | |
|---|---|
BridgeWriteBehindResponseMimeImpl(javax.portlet.MimeResponse mimeResponse,
javax.servlet.ServletResponse servletResponse)
|
|
| Method Summary | |
|---|---|
void |
flushMarkupToWrappedResponse()
This method is required by the BridgeWriteBehindResponse interface but is no longer necessary for JSF 2. |
byte[] |
getBytes()
This method is required by the BridgeWriteBehindResponse interface but is no longer necessary for JSF 2. |
char[] |
getChars()
This method is required by the BridgeWriteBehindResponse interface but is no longer necessary for JSF 2. |
OutputStream |
getPortletOutputStream()
|
PrintWriter |
getWriter()
|
boolean |
hasFacesWriteBehindMarkup()
This method is required by the BridgeWriteBehindResponse interface but is no longer necessary for JSF 2. |
boolean |
isBytes()
This method is required by the BridgeWriteBehindResponse interface but is no longer necessary for JSF 2. |
boolean |
isChars()
This method is required by the BridgeWriteBehindResponse interface but is no longer necessary for JSF 2. |
void |
setBufferSize(int size)
|
| Methods inherited from class com.liferay.faces.bridge.filter.MimeResponseWrapper |
|---|
createActionURL, createRenderURL, createResourceURL, flushBuffer, getBufferSize, getCacheControl, getCharacterEncoding, getContentType, getLocale, getResponse, isCommitted, reset, resetBuffer, setContentType |
| Methods inherited from class javax.portlet.filter.PortletResponseWrapper |
|---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty, setResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.portlet.PortletResponse |
|---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty |
| Field Detail |
|---|
public static final String AFTER_VIEW_CONTENT_RESPONSE
| Constructor Detail |
|---|
public BridgeWriteBehindResponseMimeImpl(javax.portlet.MimeResponse mimeResponse,
javax.servlet.ServletResponse servletResponse)
| Method Detail |
|---|
public void flushMarkupToWrappedResponse()
throws IOException
BridgeWriteBehindResponse interface but is no longer necessary for JSF 2.
flushMarkupToWrappedResponse in interface BridgeWriteBehindResponseIOExceptionpublic boolean hasFacesWriteBehindMarkup()
BridgeWriteBehindResponse interface but is no longer necessary for JSF 2.
hasFacesWriteBehindMarkup in interface BridgeWriteBehindResponsepublic void setBufferSize(int size)
setBufferSize in interface javax.portlet.MimeResponsesetBufferSize in class MimeResponseWrapperpublic byte[] getBytes()
BridgeWriteBehindResponse interface but is no longer necessary for JSF 2.
getBytes in interface BridgeWriteBehindResponsepublic char[] getChars()
BridgeWriteBehindResponse interface but is no longer necessary for JSF 2.
getChars in interface BridgeWriteBehindResponse
public OutputStream getPortletOutputStream()
throws IOException
getPortletOutputStream in interface javax.portlet.MimeResponsegetPortletOutputStream in class MimeResponseWrapperIOExceptionpublic boolean isBytes()
BridgeWriteBehindResponse interface but is no longer necessary for JSF 2.
isBytes in interface BridgeWriteBehindResponsepublic boolean isChars()
BridgeWriteBehindResponse interface but is no longer necessary for JSF 2.
isChars in interface BridgeWriteBehindResponse
public PrintWriter getWriter()
throws IOException
getWriter in interface javax.portlet.MimeResponsegetWriter in class MimeResponseWrapperIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||