ViewHandlingStrategy handles JSP-based views.
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | buildView(FacesContext context, UIViewRoot view)
Implements abstract javax. Take any actions specific to
this VDL implementation to cause the argument
|
| private void | doRenderView(FacesContext
the context, UIViewRoot FacesContext for the current requestthe view to render viewToRender)This is a separate method to account for handling the content after the view tag. |
| private boolean | Returns: true if the response should be immediately flushed
to the client, otherwise falsethe context, UIViewRoot FacesContext for the current requestthe view to build viewToExecute)Execute the target view. |
| public BeanInfo | getComponentMetadata(FacesContext
The context, Resource FacesContext for this request.The componentResource)Resource that represents the component.Implements abstract javax. Not supported in JSP-based views. |
| public String | getId()
Overrides javax. Returns a non-null String that can be used to identify this view declaration language. |
| public Resource | getScriptComponentResource(FacesContext
The context, Resource FacesContext for this request.The componentResource)Resource that represents the component.Implements abstract javax. Not supported in JSP-based views. |
| public StateManagementStrategy | getStateManagementStrategy(FacesContext
the context, String FacesContext for the current request.the view id. viewId)Implements abstract javax. For implementations that want to
control the implementation of state saving and restoring, the
|
| public ViewMetadata | getViewMetadata(FacesContext
The context, String FacesContext for this request.the view id from whith to extract the metadata viewId)Implements abstract javax. Not supported in JSP-based views. |
| public Stream | getViews(FacesContext
The context, String FacesContext for this request.The initial path from which to start looking for views path, ViewVisitOption... The options to influence the traversal. See options)ViewVisitOption for details on those.Overrides javax. Not supported in JSP-based views. |
| public Stream | getViews(FacesContext
The context, String FacesContext for this request.The initial path from which to start looking for views path, int The absolute maximum depth of nested directories to visit counted from the root ( maxDepth, ViewVisitOption... /).The options to influence the traversal. See options)ViewVisitOption for details on those.Overrides javax. Not supported in JSP-based views. |
| private static ViewHandlerResponseWrapper | Returns: the current response wrapped with ViewHandlerResponseWrapperthe extContext)ExternalContext for this request
Simple utility method to wrap the current response with the
|
| public boolean | handlesViewId(String
the view ID viewId)Implements abstract com. ViewHandlingStrategy should be the last one queried
and as such we return true.
|
| public void | renderView(FacesContext
the context, UIViewRoot view)FacesContext for this request.Implements abstract javax. Render a view rooted at
argument |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| responseBufferSize | back to summary |
|---|---|
| private int responseBufferSize | |
| JspViewHandlingStrategy | back to summary |
|---|---|
| public JspViewHandlingStrategy() | |
| buildView | back to summary |
|---|---|
| public void buildView(FacesContext context, UIViewRoot view) throws IOException Implements abstract javax. Doc from javax. Take any actions specific to
this VDL implementation to cause the argument
The Facelets implementation must insure that markup comprising
the view must be executed, with the
If the
| |
| doRenderView | back to summary |
|---|---|
| private void doRenderView(FacesContext context, UIViewRoot viewToRender) throws 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 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.
| |
| executePageToBuildView | back to summary |
|---|---|
| private boolean executePageToBuildView(FacesContext context, UIViewRoot viewToExecute) throws IOException Execute the target view. If the HTTP status code range is not 2xx, then return true to indicate the response should be immediately flushed by the caller so that conditions such as 404 are properly handled.
| |
| getComponentMetadata | back to summary |
|---|---|
| public BeanInfo getComponentMetadata(FacesContext context, Resource componentResource) Implements abstract javax. Not supported in JSP-based views.
| |
| getId | back to summary |
|---|---|
| public String getId() Overrides javax. Doc from javax. Returns a non-null String that can be used to identify this view declaration language. The default implementation returns the fully qualified class name of the view declaration language implementation. Subclasses may override to provide a more meaningful id. | |
| getScriptComponentResource | back to summary |
|---|---|
| public Resource getScriptComponentResource(FacesContext context, Resource componentResource) Implements abstract javax. Not supported in JSP-based views.
| |
| getStateManagementStrategy | back to summary |
|---|---|
| public StateManagementStrategy getStateManagementStrategy(FacesContext context, String viewId) Implements abstract javax. Doc from javax. For implementations that want to
control the implementation of state saving and restoring, the
| |
| getViewMetadata | back to summary |
|---|---|
| public ViewMetadata getViewMetadata(FacesContext context, String viewId) Implements abstract javax. Not supported in JSP-based views.
| |
| getViews | back to summary |
|---|---|
| public Stream Overrides javax. Not supported in JSP-based views.
| |
| getWrapper | back to summary |
|---|---|
| private static ViewHandlerResponseWrapper getWrapper(ExternalContext extContext)
Simple utility method to wrap the current response with the
| |
| handlesViewId | back to summary |
|---|---|
| public boolean handlesViewId(String viewId) Implements abstract com. This
| |
| renderView | back to summary |
|---|---|
| public void renderView(FacesContext context, UIViewRoot view) throws IOException Implements abstract javax. Doc from javax. Render a view rooted at
argument
| |