Class SubviewTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.BodyTag
,jakarta.servlet.jsp.tagext.IterationTag
,jakarta.servlet.jsp.tagext.JspIdConsumer
,jakarta.servlet.jsp.tagext.JspTag
,jakarta.servlet.jsp.tagext.Tag
public class SubviewTag extends UIComponentELTag
-
Field Summary
Fields inherited from class jakarta.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIX
-
Constructor Summary
Constructors Constructor Description SubviewTag()
-
Method Summary
Modifier and Type Method Description protected UIComponent
createVerbatimComponentFromBodyContent()
Create a transient UIOutput component from the body content, of this tag instance or return null if there is no body content, the body content is whitespace, or the body content is a comment.int
doEndTag()
Perform any processing necessary to handle the content implications of CASE 3 in the class description.int
doStartTag()
Perform any processing necessary to find (or create) theUIComponent
instance in the view corresponding to this tag instance in the page and, if and only if a component was created, insert it into the tree at the proper location as expected by the page author.String
getComponentType()
Return the component type for the component that is or will be bound to this tag.String
getRendererType()
Return therendererType
property that selects theRenderer
to be used for encoding this component, ornull
to ask the component to render itself directly.Methods inherited from class jakarta.faces.webapp.UIComponentELTag
createComponent, getELContext, hasBinding, release, setBinding, setProperties, setRendered
Methods inherited from class jakarta.faces.webapp.UIComponentClassicTagBase
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, doAfterBody, doInitBody, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter
-
Constructor Details
-
SubviewTag
public SubviewTag()
-
-
Method Details
-
getComponentType
Description copied from class:UIComponentTagBase
Return the component type for the component that is or will be bound to this tag. This value can be passed to
Application.createComponent(java.lang.String)
to create theUIComponent
instance for this tag. Subclasses must override this method to return the appropriate value.- Specified by:
getComponentType
in classUIComponentTagBase
- Returns:
- the component type
-
getRendererType
Description copied from class:UIComponentTagBase
Return the
rendererType
property that selects theRenderer
to be used for encoding this component, ornull
to ask the component to render itself directly. Subclasses must override this method to return the appropriate value.- Specified by:
getRendererType
in classUIComponentTagBase
- Returns:
- the renderer type
-
createVerbatimComponentFromBodyContent
Description copied from class:UIComponentClassicTagBase
Create a transient UIOutput component from the body content, of this tag instance or return null if there is no body content, the body content is whitespace, or the body content is a comment.
- Overrides:
createVerbatimComponentFromBodyContent
in classUIComponentClassicTagBase
- Returns:
- the component
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionDescription copied from class:UIComponentClassicTagBase
Perform any processing necessary to handle the content implications of CASE 3 in the class description.
The default implementation, which is intended to be sufficient for most components, calls
UIComponentClassicTagBase.createVerbatimComponentFromBodyContent()
on this instance and adds it as a child of the component for this tag's component at the end of the child list. In addition, the following housekeeping steps are taken.- Retrieve from the
UIComponent
the set of component ids of child components created byUIComponentTag
instances the last time this page was processed (if any). Compare it to the list of children created during this page processing pass, and remove all children present in the old list but not the new. Save the new list as a component attribute so that it gets saved as part of the component's state. - Retrieve from the
UIComponent
the set of facet names of facets created byUIComponentTag
instances the last time this page was processed (if any). Compare it to the list of facets created during this page processing pass, and remove all facets present in the old list but not the new. Save the new list as a component attribute so that it gets saved as part of the component's state. - Release all references to the component, and pop it from the component stack for this response, removing the stack if this was the outermost component.
The flag value to be returned is acquired by calling the
getDoEndValue()
method, which tag subclasses may override if they do not want the default value.- Specified by:
doEndTag
in interfacejakarta.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classUIComponentClassicTagBase
- Throws:
jakarta.servlet.jsp.JspException
- if an error occurs
- Retrieve from the
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionDescription copied from class:UIComponentClassicTagBase
Perform any processing necessary to find (or create) the
UIComponent
instance in the view corresponding to this tag instance in the page and, if and only if a component was created, insert it into the tree at the proper location as expected by the page author. Secondarily, cause a transientUIOutput
component to be created and placed in the tree before theUIComponent
instance for this tag. The value of thisUIOutput
component must include anything covered byCASE 1
orCASE 2
in the class description.The default implementation, which is intended to be sufficient for most components, implements this secondary requirement by calling
UIComponentClassicTagBase.getParentUIComponentClassicTagBase(jakarta.servlet.jsp.PageContext)
, and callingUIComponentClassicTagBase.createVerbatimComponentFromBodyContent()
on the result. It then adds the returned component to the tree before the actual component for this tag instance instance by callingUIComponentClassicTagBase.addVerbatimBeforeComponent(jakarta.faces.webapp.UIComponentClassicTagBase, jakarta.faces.component.UIComponent, jakarta.faces.component.UIComponent)
.Before returning, the component is pushed onto the component stack for this response to enable the
UIComponentClassicTagBase.getParentUIComponentClassicTagBase(jakarta.servlet.jsp.PageContext)
method to work properly.The flag value to be returned is acquired by calling the
getDoStartValue()
method, which tag subclasses may override if they do not want the default value.- Specified by:
doStartTag
in interfacejakarta.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classUIComponentClassicTagBase
- Throws:
jakarta.servlet.jsp.JspException
- if an error occurs
-