public class JspViewHandlingStrategy extends ViewHandlingStrategy
ViewHandlingStrategy handles JSP-based views.associate, webConfig| Constructor and Description |
|---|
JspViewHandlingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildView(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIViewRoot view)
Take any actions specific to this VDL implementation to cause the argument
|
BeanInfo |
getComponentMetadata(jakarta.faces.context.FacesContext context,
jakarta.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. |
jakarta.faces.application.Resource |
getScriptComponentResource(jakarta.faces.context.FacesContext context,
jakarta.faces.application.Resource componentResource)
Not supported in JSP-based views.
|
jakarta.faces.view.StateManagementStrategy |
getStateManagementStrategy(jakarta.faces.context.FacesContext context,
String viewId)
For implementations that want to control the implementation of state saving and restoring, the
|
jakarta.faces.view.ViewMetadata |
getViewMetadata(jakarta.faces.context.FacesContext context,
String viewId)
Not supported in JSP-based views.
|
Stream<String> |
getViews(jakarta.faces.context.FacesContext context,
String path,
int maxDepth,
jakarta.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
|
Stream<String> |
getViews(jakarta.faces.context.FacesContext context,
String path,
jakarta.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(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIViewRoot view)
Render a view rooted at argument |
createView, restoreViewpublic jakarta.faces.view.ViewMetadata getViewMetadata(jakarta.faces.context.FacesContext context,
String viewId)
Not supported in JSP-based views.
getViewMetadata in class jakarta.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.viewId - the view id from which to extract the metadataViewDeclarationLanguage.getViewMetadata(jakarta.faces.context.FacesContext, String)public void buildView(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIViewRoot view)
throws IOException
jakarta.faces.view.ViewDeclarationLanguage
Take any actions specific to this VDL implementation to cause the argument
UIViewRoot which must have been created via a call to ViewDeclarationLanguage.createView(jakarta.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(jakarta.faces.event.PhaseEvent) method of any PhaseListeners attached to the
application is called
The UIViewRoot phase listener installed via
UIViewRoot.setAfterPhaseListener(jakarta.el.MethodExpression) or
UIViewRoot.addPhaseListener(jakarta.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 jakarta.faces.view.ViewDeclarationLanguagecontext - view - IOExceptionViewDeclarationLanguage.buildView(jakarta.faces.context.FacesContext,
jakarta.faces.component.UIViewRoot)public void renderView(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIViewRoot view)
throws IOException
jakarta.faces.view.ViewDeclarationLanguage
Render a view rooted at argumentview. See section JSF.7.7.2 for the specification of the default
implementation.
renderView in class jakarta.faces.view.ViewDeclarationLanguagecontext - the FacesContext for this request.view - the UIViewRoot from an early call to ViewDeclarationLanguage.createView(jakarta.faces.context.FacesContext, java.lang.String) or ViewDeclarationLanguage.restoreView(jakarta.faces.context.FacesContext, java.lang.String).IOException - if the view cannot be rendered for any reasonViewDeclarationLanguage.renderView(jakarta.faces.context.FacesContext,
jakarta.faces.component.UIViewRoot)public jakarta.faces.view.StateManagementStrategy getStateManagementStrategy(jakarta.faces.context.FacesContext context,
String viewId)
jakarta.faces.view.ViewDeclarationLanguage
For 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 jakarta.faces.view.ViewDeclarationLanguagecontext - the FacesContext for the current request.viewId - the view id.public BeanInfo getComponentMetadata(jakarta.faces.context.FacesContext context, jakarta.faces.application.Resource componentResource)
Not supported in JSP-based views.
getComponentMetadata in class jakarta.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.componentResource - The Resource that represents the component.ViewDeclarationLanguage.getComponentMetadata(jakarta.faces.context.FacesContext,
jakarta.faces.application.Resource)public jakarta.faces.application.Resource getScriptComponentResource(jakarta.faces.context.FacesContext context,
jakarta.faces.application.Resource componentResource)
Not supported in JSP-based views.
getScriptComponentResource in class jakarta.faces.view.ViewDeclarationLanguagecontext - The FacesContext for this request.componentResource - The Resource that represents the component.Resource corresponding to the argument componentResourceViewDeclarationLanguage.getScriptComponentResource(jakarta.faces.context.FacesContext,
jakarta.faces.application.Resource)public Stream<String> getViews(jakarta.faces.context.FacesContext context, String path, jakarta.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
getViews in class jakarta.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(jakarta.faces.context.FacesContext context, String path, int maxDepth, jakarta.faces.application.ViewVisitOption... options)
Not supported in JSP-based views.
getViews in class jakarta.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()
jakarta.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 jakarta.faces.view.ViewDeclarationLanguageCopyright © 2010–2022 JBoss by Red Hat. All rights reserved.