private static class UIComponentTag.UIComponentTagAdapter extends UIComponentTag
Modifier and Type | Field and Description |
---|---|
(package private) UIComponentClassicTagBase |
classicDelegate |
bodyContent, namingContainerChildIds, pageContext, UNIQUE_ID_PREFIX
log
Constructor and Description |
---|
UIComponentTagAdapter(UIComponentClassicTagBase classicDelegate) |
Modifier and Type | Method and Description |
---|---|
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) 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. |
UIComponent |
getComponentInstance()
Return the
UIComponent instance that is associated with
this tag instance. |
java.lang.String |
getComponentType()
Return the component type for the component that is or will be
bound to this tag.
|
boolean |
getCreated()
Return
true if we dynamically created a new component
instance during execution of this tag. |
javax.servlet.jsp.tagext.Tag |
getParent()
Return the
Tag that is the parent of this instance. |
java.lang.String |
getRendererType()
Return the
rendererType property that selects the
Renderer to be used for encoding this component, or
null to ask the component to render itself directly. |
void |
setParent(javax.servlet.jsp.tagext.Tag parent)
Set the
Tag that is the parent of this instance. |
createComponent, getParentUIComponentTag, hasBinding, isSuppressed, isValueReference, release, setBinding, setProperties, setRendered
addChild, addChildToComponentAndTag, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doInitBody, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setupResponseWriter
getELContext
UIComponentClassicTagBase classicDelegate
public UIComponentTagAdapter(UIComponentClassicTagBase classicDelegate)
public java.lang.String getComponentType()
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
the UIComponent
instance for this tag. Subclasses must
override this method to return the appropriate value.
getComponentType
in class UIComponentTagBase
public java.lang.String getRendererType()
UIComponentTagBase
Return the rendererType
property that selects the
Renderer
to be used for encoding this component, or
null
to ask the component to render itself directly.
Subclasses must override this method to return the appropriate value.
getRendererType
in class UIComponentTagBase
public int doStartTag() throws javax.servlet.jsp.JspException
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 transient
UIOutput
component to be created and placed in the tree
before the UIComponent
instance for
this tag. The value of this UIOutput
component must include anything covered by CASE 1
or
CASE 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(javax.servlet.jsp.PageContext)
, and calling
UIComponentClassicTagBase.createVerbatimComponentFromBodyContent()
on the result.
It then adds the returned component to the tree before the
actual component for this tag instance instance by calling
UIComponentClassicTagBase.addVerbatimBeforeComponent(javax.faces.webapp.UIComponentClassicTagBase, javax.faces.component.UIComponent, javax.faces.component.UIComponent)
.
Before returning, the component is pushed onto the component
stack for this response to enable the UIComponentClassicTagBase.getParentUIComponentClassicTagBase(javax.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.
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class UIComponentClassicTagBase
javax.servlet.jsp.JspException
- if an error occurspublic int doEndTag() throws javax.servlet.jsp.JspException
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.
UIComponent
the set of component
ids of child components created by UIComponentTag
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.UIComponent
the set of facet names
of facets created by UIComponentTag
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.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.
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class UIComponentClassicTagBase
javax.servlet.jsp.JspException
- if an error occurspublic UIComponent getComponentInstance()
UIComponentClassicTagBase
Return the UIComponent
instance that is associated with
this tag instance. This method is designed to be used by tags nested
within this tag, and only returns useful results between the
execution of doStartTag()
and doEndTag()
on this tag instance.
getComponentInstance
in class UIComponentClassicTagBase
public boolean getCreated()
UIComponentClassicTagBase
Return true
if we dynamically created a new component
instance during execution of this tag. This method is designed to be
used by tags nested within this tag, and only returns useful results
between the execution of doStartTag()
and
doEndTag()
on this tag instance.
getCreated
in class UIComponentClassicTagBase
public javax.servlet.jsp.tagext.Tag getParent()
UIComponentClassicTagBase
Return the Tag
that is the parent of this instance.
getParent
in interface javax.servlet.jsp.tagext.Tag
getParent
in class UIComponentClassicTagBase
public void setParent(javax.servlet.jsp.tagext.Tag parent)
UIComponentClassicTagBase
Set the Tag
that is the parent of this instance.
setParent
in interface javax.servlet.jsp.tagext.Tag
setParent
in class UIComponentClassicTagBase
parent
- The new parent Tag