com.sun.faces.application.view
public class JspViewHandlingStrategy extends ViewHandlingStrategy
ViewHandlingStrategy
handles JSP-based views.Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
private int |
responseBufferSize |
associate, webConfig
Constructor and Description |
---|
JspViewHandlingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
buildView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view) |
private void |
doRenderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
This is a separate method to account for handling the content
after the view tag.
|
private boolean |
executePageToBuildView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToExecute)
Execute the target view.
|
java.beans.BeanInfo |
getComponentMetadata(javax.faces.context.FacesContext context,
javax.faces.application.Resource componentResource)
Not supported in JSP-based views.
|
java.lang.String |
getId() |
javax.faces.application.Resource |
getScriptComponentResource(javax.faces.context.FacesContext context,
javax.faces.application.Resource componentResource)
Not supported in JSP-based views.
|
javax.faces.view.StateManagementStrategy |
getStateManagementStrategy(javax.faces.context.FacesContext context,
java.lang.String viewId) |
javax.faces.view.ViewMetadata |
getViewMetadata(javax.faces.context.FacesContext context,
java.lang.String viewId)
Not supported in JSP-based views.
|
private static ViewHandlerResponseWrapper |
getWrapper(javax.faces.context.ExternalContext extContext)
Simple utility method to wrap the current response with the
ViewHandlerResponseWrapper . |
boolean |
handlesViewId(java.lang.String viewId)
This
ViewHandlingStrategy should be the last one queried
and as such we return true . |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view) |
createView, restoreView
private static final java.util.logging.Logger LOGGER
private int responseBufferSize
public java.beans.BeanInfo getComponentMetadata(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource)
Not supported in JSP-based views.
getComponentMetadata
in class javax.faces.view.ViewDeclarationLanguage
ViewDeclarationLanguage.getComponentMetadata(javax.faces.context.FacesContext, javax.faces.application.Resource)
public javax.faces.view.ViewMetadata getViewMetadata(javax.faces.context.FacesContext context, java.lang.String viewId)
Not supported in JSP-based views.
getViewMetadata
in class javax.faces.view.ViewDeclarationLanguage
ViewDeclarationLanguage.getViewMetadata(javax.faces.context.FacesContext, String)
public javax.faces.application.Resource getScriptComponentResource(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource)
Not supported in JSP-based views.
getScriptComponentResource
in class javax.faces.view.ViewDeclarationLanguage
ViewDeclarationLanguage.getScriptComponentResource(javax.faces.context.FacesContext, javax.faces.application.Resource)
public void buildView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot view) throws java.io.IOException
buildView
in class javax.faces.view.ViewDeclarationLanguage
context
- view
- java.io.IOException
ViewDeclarationLanguage.buildView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
public void renderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot view) throws java.io.IOException
renderView
in class javax.faces.view.ViewDeclarationLanguage
java.io.IOException
ViewDeclarationLanguage.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
public javax.faces.view.StateManagementStrategy getStateManagementStrategy(javax.faces.context.FacesContext context, java.lang.String viewId)
getStateManagementStrategy
in class javax.faces.view.ViewDeclarationLanguage
public boolean handlesViewId(java.lang.String viewId)
ViewHandlingStrategy
should be the last one queried
and as such we return true
.handlesViewId
in class ViewHandlingStrategy
viewId
- the view IDtrue
if this ViewHandlingStrategy
handles the the view type represented by viewId
ViewHandlingStrategy.handlesViewId(String)
public java.lang.String getId()
getId
in class javax.faces.view.ViewDeclarationLanguage
private boolean executePageToBuildView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToExecute) throws java.io.IOException
context
- the FacesContext
for the current requestviewToExecute
- the view to buildtrue
if the response should be immediately flushed
to the client, otherwise false
java.io.IOException
- if an error occurs executing the pageprivate void doRenderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToRender) throws java.io.IOException
This is a separate method to account for handling the content after the view tag.
Create a new ResponseWriter around this response's Writer. Set it into the FacesContext, saving the old one aside.
call encodeBegin(), encodeChildren(), encodeEnd() on the
argument UIViewRoot
.
Restore the old ResponseWriter into the FacesContext.
Write out the after view content to the response's writer.
Flush the response buffer, and remove the after view content from the request scope.
context
- the FacesContext
for the current requestviewToRender
- the view to renderjava.io.IOException
- if an error occurs rendering the view to the clientjavax.faces.FacesException
- if some error occurs within the framework
processingprivate static ViewHandlerResponseWrapper getWrapper(javax.faces.context.ExternalContext extContext)
Simple utility method to wrap the current response with the
ViewHandlerResponseWrapper
.
extContext
- the ExternalContext
for this requestCopyright © 2002-2010 Oracle America, Inc. All Rights Reserved.