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 UIComponentcreateVerbatimComponentFromBodyContent()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.intdoEndTag()Perform any processing necessary to handle the content implications of CASE 3 in the class description.intdoStartTag()Perform any processing necessary to find (or create) theUIComponentinstance 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.StringgetComponentType()Return the component type for the component that is or will be bound to this tag.StringgetRendererType()Return therendererTypeproperty that selects theRendererto be used for encoding this component, ornullto ask the component to render itself directly.Methods inherited from class jakarta.faces.webapp.UIComponentELTag
createComponent, getELContext, hasBinding, release, setBinding, setProperties, setRenderedMethods 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:UIComponentTagBaseReturn 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 theUIComponentinstance for this tag. Subclasses must override this method to return the appropriate value.- Specified by:
getComponentTypein classUIComponentTagBase- Returns:
- the component type
-
getRendererType
Description copied from class:UIComponentTagBaseReturn the
rendererTypeproperty that selects theRendererto be used for encoding this component, ornullto ask the component to render itself directly. Subclasses must override this method to return the appropriate value.- Specified by:
getRendererTypein classUIComponentTagBase- Returns:
- the renderer type
-
createVerbatimComponentFromBodyContent
Description copied from class:UIComponentClassicTagBaseCreate 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:
createVerbatimComponentFromBodyContentin classUIComponentClassicTagBase- Returns:
- the component
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionDescription copied from class:UIComponentClassicTagBasePerform 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
UIComponentthe set of component ids of child components created byUIComponentTaginstances 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
UIComponentthe set of facet names of facets created byUIComponentTaginstances 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:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin 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:UIComponentClassicTagBasePerform any processing necessary to find (or create) the
UIComponentinstance 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 transientUIOutputcomponent to be created and placed in the tree before theUIComponentinstance for this tag. The value of thisUIOutputcomponent must include anything covered byCASE 1orCASE 2in 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:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classUIComponentClassicTagBase- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-