The contract that a view declaration language must implement to interact with the Jakarta Faces runtime. An implementation of this class must be thread-safe.
Instances of this class are application scoped and must be obtained from the ViewDeclarationLanguageFactory.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | FACELETS_VIEW_DECLARATION_LANGUAGE_ID
Identifier for the Facelets view declaration language. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | buildView(FacesContext
the context, UIViewRoot FacesContext for this requestthe root)UIViewRoot to populate with children using techniques specific to this VDL
implementation.
Take any actions specific to this VDL implementation to cause the argument
|
| public List | Returns: the calculated list of resource library contract namesthe context, String FacesContext for this requestthe view id for which the applicable resource library contracts should be calculated. viewId)
Return the list of resource library contracts that will be made available for use in the view specified by the
argument |
| public UIComponent | Returns: the newly created componentthe context, String FacesContext for this requestthe fully qualified tag library URI that contains the component taglibURI, String the name of the tag within that library that exposes the component tagName, Map<String, Object> any name=value pairs that would otherwise have been given on the markup that would cause the
creation of this component or attributes)null if no attributes need be given.
Create a component given a |
| public abstract UIViewRoot | Returns: the newly created view rootthe context, String FacesContext for this request.the identifier of an artifact that contains the VDL syntax that describes this view. viewId)
Create a |
| public abstract BeanInfo | Returns: the component metadataThe context, Resource FacesContext for this request.The componentResource)Resource that represents the component.
Return a reference to the component metadata for the composite component represented by the argument
|
| public String | Returns: the id of this view declaration languageReturns a non-null String that can be used to identify this view declaration language. |
| public abstract Resource | getScriptComponentResource(FacesContext
The context, Resource FacesContext for this request.The componentResource)Resource that represents the component.
Take implementation specific action to discover a |
| public abstract StateManagementStrategy | Returns: the strategy as specified abovethe context, String FacesContext for the current request.the view id. viewId)
For implementations that want to control the implementation of state saving and restoring, the
|
| public abstract ViewMetadata | Returns: the view metadataThe context, String FacesContext for this request.the view id from which to extract the metadata viewId)
Return a reference to the view metadata for the view represented by the argument |
| public Stream | Returns: theStream of view idsThe facesContext, 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.
Return a |
| public Stream | Returns: theStream of view idsThe facesContext, 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.
Return a |
| public abstract void | renderView(FacesContext
the context, UIViewRoot view)FacesContext for this request.
Render a view rooted at argument |
| public abstract UIViewRoot | Returns: the restored viewthe context, String FacesContext for this request.the identifier for a previously rendered view. viewId)
Restore a |
| public void | retargetAttachedObjects(FacesContext
the FacesContext for this request. context, UIComponent The UIComponent in the view to which the attached objects must be attached. This UIComponent
must have its component metadata already associated and available from via the JavaBeans API. topLevelComponent, List<AttachedObjectHandler> the tag handlers for the attached objects handlers)
Assuming the component metadata for argument
|
| public void | retargetMethodExpressions(FacesContext
the FacesContext for this request. context, UIComponent The UIComponent in the view to which the attached objects must be attached. This UIComponent
must have its component metadata already associated and available from via the JavaBeans API. topLevelComponent)
Assuming the component metadata for argument |
| public boolean | Returns: the result as specified aboveThe context, String FacesContext for this request.the view id to test viewId)Tests whether a physical resource corresponding to the specified viewId exists. |
| FACELETS_VIEW_DECLARATION_LANGUAGE_ID | back to summary |
|---|---|
| public static final String FACELETS_VIEW_DECLARATION_LANGUAGE_ID Identifier for the Facelets view declaration language.
| |
| ViewDeclarationLanguage | back to summary |
|---|---|
| public ViewDeclarationLanguage() | |
| buildView | back to summary |
|---|---|
| public abstract void buildView(FacesContext context, UIViewRoot root) throws IOException
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
| |
| calculateResourceLibraryContracts | back to summary |
|---|---|
| public List
Return the list of resource library contracts that will be made available for use in the view specified by the
argument
| |
| createComponent | back to summary |
|---|---|
| public UIComponent createComponent(FacesContext context, String taglibURI, String tagName, Map<String, Object> attributes)
Create a component given a
| |
| createView | back to summary |
|---|---|
| public abstract UIViewRoot createView(FacesContext context, String viewId)
Create a
| |
| getComponentMetadata | back to summary |
|---|---|
| public abstract BeanInfo getComponentMetadata(FacesContext context, Resource componentResource)
Return a reference to the component metadata for the composite component represented by the argument
| |
| getId | back to summary |
|---|---|
| public String getId() 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 abstract Resource getScriptComponentResource(FacesContext context, Resource componentResource)
Take implementation specific action to discover a
| |
| getStateManagementStrategy | back to summary |
|---|---|
| public abstract StateManagementStrategy getStateManagementStrategy(FacesContext context, String viewId)
For implementations that want to control the implementation of state saving and restoring, the
| |
| getViewMetadata | back to summary |
|---|---|
| public abstract ViewMetadata getViewMetadata(FacesContext context, String viewId)
Return a reference to the view metadata for the view represented by the argument
| |
| getViews | back to summary |
|---|---|
| public Stream
Return a This method works as if invoking it were equivalent to evaluating the expression: Put differently, it visits all levels of the resource tree.getViewResources(facesContext, start, Integer.MAX_VALUE, options)
| |
| getViews | back to summary |
|---|---|
| public Stream
Return a
The
| |
| renderView | back to summary |
|---|---|
| public abstract void renderView(FacesContext context, UIViewRoot view) throws IOException
Render a view rooted at argument
| |
| restoreView | back to summary |
|---|---|
| public abstract UIViewRoot restoreView(FacesContext context, String viewId)
Restore a
| |
| retargetAttachedObjects | back to summary |
|---|---|
| public void retargetAttachedObjects(FacesContext context, UIComponent topLevelComponent, List<AttachedObjectHandler> handlers)
Assuming the component metadata for argument
An algorithm semantically equivalent to the following must be implemented.
The implementation must support retargeting attached objects from the top level compsite component to targets that are composite and non-composite components.
An implementation is provided that will throw
| |
| retargetMethodExpressions | back to summary |
|---|---|
| public void retargetMethodExpressions(FacesContext context, UIComponent topLevelComponent)
Assuming the component metadata for argument
An implementation is provided that will throw
| |
| viewExists | back to summary |
|---|---|
| public boolean viewExists(FacesContext context, String viewId) Tests whether a physical resource corresponding to the specified viewId exists.
The default implementation uses
| |