public class JspViewHandlingStrategy extends ViewHandlingStrategy
ViewHandlingStrategy handles JSP-based views.associate, webConfig| Constructor and Description |
|---|
JspViewHandlingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view)
Take any actions specific to
this VDL implementation to cause the argument
|
BeanInfo |
getComponentMetadata(javax.faces.context.FacesContext context,
javax.faces.application.Resource componentResource)
Not supported in JSP-based views.
|
String |
getId()
Returns a non-null String that can be used to identify this view declaration language. |
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,
String viewId)
For implementations that want to
control the implementation of state saving and restoring, the
|
javax.faces.view.ViewMetadata |
getViewMetadata(javax.faces.context.FacesContext context,
String viewId)
Not supported in JSP-based views.
|
Stream<String> |
getViews(javax.faces.context.FacesContext context,
String path,
int maxDepth,
javax.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
|
Stream<String> |
getViews(javax.faces.context.FacesContext context,
String path,
javax.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
|
boolean |
handlesViewId(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)
Render a view rooted at
argument |
createView, restoreViewpublic javax.faces.view.ViewMetadata getViewMetadata(javax.faces.context.FacesContext context,
String viewId)
Not supported in JSP-based views.
getViewMetadata in class javax.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.viewId - the view id from which to extract the metadataViewDeclarationLanguage.getViewMetadata(javax.faces.context.FacesContext, String)public void buildView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view)
throws IOException
javax.faces.view.ViewDeclarationLanguageTake any actions specific to
this VDL implementation to cause the argument
UIViewRoot which must have been created via a call
to ViewDeclarationLanguage.createView(javax.faces.context.FacesContext, java.lang.String), to be populated with children.
The Facelets implementation must insure that markup comprising
the view must be executed, with the UIComponent instances in the view being
encountered in the same depth-first order as in other lifecycle
methods defined on UIComponent, and added to the
view (but not rendered) during the traversal. The runtime must
guarantee that the view must be fully populated before any of the
following happen.
The PhaseListener.afterPhase(javax.faces.event.PhaseEvent)
method of any PhaseListeners attached to the
application is called
The UIViewRoot phase
listener installed via UIViewRoot.setAfterPhaseListener(javax.el.MethodExpression) or UIViewRoot.addPhaseListener(javax.faces.event.PhaseListener) are called.
If the root is
already populated with children, the view must still be re-built,
but care must be taken to ensure that the existing components are
correctly paired up with their VDL counterparts in the VDL page.
Also, any system events that would normally be generated during
the adding or removing of components from the view must be
temporarily disabled during the creation of the view and then
re-enabled when the view has been built.
buildView in class javax.faces.view.ViewDeclarationLanguagecontext - view - IOExceptionViewDeclarationLanguage.buildView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)public void renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view)
throws IOException
javax.faces.view.ViewDeclarationLanguageRender a view rooted at
argumentview. See section JSF.7.7.2 for the
specification of the default implementation.
renderView in class javax.faces.view.ViewDeclarationLanguagecontext - the FacesContext for this request.view - the UIViewRoot from an early call to
ViewDeclarationLanguage.createView(javax.faces.context.FacesContext, java.lang.String) or ViewDeclarationLanguage.restoreView(javax.faces.context.FacesContext, java.lang.String).IOException - if the view cannot be rendered for any reasonViewDeclarationLanguage.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)public javax.faces.view.StateManagementStrategy getStateManagementStrategy(javax.faces.context.FacesContext context,
String viewId)
javax.faces.view.ViewDeclarationLanguageFor implementations that want to
control the implementation of state saving and restoring, the
StateManagementStrategy allows them to do so. Returning
null indicates that the implementation wishes the
runtime to handle the state saving and restoring.
Implementations that provide the VDL for Facelets for Jakarta Server Faces 2.0 and
later must return non-null from this method.
getStateManagementStrategy in class javax.faces.view.ViewDeclarationLanguagecontext - the FacesContext for the current request.viewId - the view id.public BeanInfo getComponentMetadata(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource)
Not supported in JSP-based views.
getComponentMetadata in class javax.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.componentResource - The Resource that represents the component.ViewDeclarationLanguage.getComponentMetadata(javax.faces.context.FacesContext, javax.faces.application.Resource)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.ViewDeclarationLanguagecontext - The FacesContext for this request.componentResource - The Resource that represents the component.Resource corresponding to the argument componentResourceViewDeclarationLanguage.getScriptComponentResource(javax.faces.context.FacesContext, javax.faces.application.Resource)public Stream<String> getViews(javax.faces.context.FacesContext context, String path, javax.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
getViews in class javax.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.path - The initial path from which to start looking for viewsoptions - The options to influence the traversal. See ViewVisitOption for details on those.Stream of view idsViewDeclarationLanguage.getViews(FacesContext, String, ViewVisitOption...)public Stream<String> getViews(javax.faces.context.FacesContext context, String path, int maxDepth, javax.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
getViews in class javax.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.path - The initial path from which to start looking for viewsmaxDepth - The absolute maximum depth of nested directories to visit counted from the root (/).options - The options to influence the traversal. See ViewVisitOption for details on those.Stream of view idsViewDeclarationLanguage.getViews(FacesContext, String, int, ViewVisitOption...)public boolean handlesViewId(String viewId)
ViewHandlingStrategy should be the last one queried
and as such we return true.handlesViewId in class ViewHandlingStrategyviewId - the view IDtrue if this ViewHandlingStrategy
handles the the view type represented by viewIdViewHandlingStrategy.handlesViewId(String)public String getId()
javax.faces.view.ViewDeclarationLanguageReturns 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.
getId in class javax.faces.view.ViewDeclarationLanguageCopyright © 2010–2020 JBoss by Red Hat. All rights reserved.