Class UIComponentClassicTagBase
- java.lang.Object
-
- javax.faces.webapp.UIComponentTagBase
-
- javax.faces.webapp.UIComponentClassicTagBase
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspIdConsumer,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
UIComponentELTag,UIComponentTag
public abstract class UIComponentClassicTagBase extends UIComponentTagBase implements javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.JspIdConsumer
- Since:
- 1.2
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.jsp.tagext.BodyContentbodyContentprotected javax.servlet.jsp.PageContextpageContextprotected static StringUNIQUE_ID_PREFIX-
Fields inherited from class javax.faces.webapp.UIComponentTagBase
log
-
-
Constructor Summary
Constructors Constructor Description UIComponentClassicTagBase()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddChild(UIComponent child)protected voidaddFacet(String name)protected voidaddVerbatimAfterComponent(UIComponentClassicTagBase parentTag, UIComponent verbatim, UIComponent component)Add verbatim as a sibling of _componentInstance in _componentInstance in the parent's child list.protected voidaddVerbatimBeforeComponent(UIComponentClassicTagBase parentTag, UIComponent verbatimComp, UIComponent component)protected abstract UIComponentcreateComponent(FacesContext context, String newId)protected UIOutputcreateVerbatimComponent()Creates a transient UIOutput using the Application, with the following characteristics:protected UIComponentcreateVerbatimComponentFromBodyContent()Creates a UIComponent from the BodyContentintdoAfterBody()intdoEndTag()voiddoInitBody()intdoStartTag()protected voidencodeBegin()Invoke encodeBegin on the associated UIComponent.protected voidencodeChildren()Invoke encodeChildren on the associated UIComponent.protected voidencodeEnd()Invoke encodeEnd on the associated UIComponent.protected UIComponentfindComponent(FacesContext context)Return the corresponding UIComponent for this tag, creating it if necessary.javax.servlet.jsp.tagext.BodyContentgetBodyContent()UIComponentgetComponentInstance()Return the UIComponent instance associated with this tag.booleangetCreated()protected List<String>getCreatedComponents()protected intgetDoAfterBodyValue()protected intgetDoEndValue()Get the value to be returned by the doEndTag method to the JSP framework.protected intgetDoStartValue()Get the value to be returned by the doStartTag method to the JSP framework.protected FacesContextgetFacesContext()protected StringgetFacesJspId()protected StringgetFacetName()protected StringgetId()Return the id (if any) specified as an xml attribute on this tag.protected intgetIndexOfNextChildTag()StringgetJspId()javax.servlet.jsp.tagext.TaggetParent()Returns the enclosing JSP tag object.static UIComponentClassicTagBasegetParentUIComponentClassicTagBase(javax.servlet.jsp.PageContext pageContext)javax.servlet.jsp.JspWritergetPreviousOut()protected abstract booleanhasBinding()voidrelease()voidsetBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)voidsetId(String id)voidsetJspId(String jspId)voidsetPageContext(javax.servlet.jsp.PageContext pageContext)Standard method invoked by the JSP framework to inform this tag of the PageContext associated with the jsp page currently being processed.voidsetParent(javax.servlet.jsp.tagext.Tag tag)Standard method invoked by the JSP framework to inform this tag of the enclosing JSP tag object.protected abstract voidsetProperties(UIComponent component)protected voidsetupResponseWriter()Deprecated.the ResponseWriter is now set byViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)-
Methods inherited from class javax.faces.webapp.UIComponentTagBase
getComponentType, getELContext, getRendererType
-
-
-
-
Field Detail
-
UNIQUE_ID_PREFIX
protected static final String UNIQUE_ID_PREFIX
- See Also:
- Constant Field Values
-
pageContext
protected javax.servlet.jsp.PageContext pageContext
-
bodyContent
protected javax.servlet.jsp.tagext.BodyContent bodyContent
-
-
Method Detail
-
setProperties
protected abstract void setProperties(UIComponent component)
-
createComponent
protected abstract UIComponent createComponent(FacesContext context, String newId) throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
-
release
public void release()
- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag
-
getCreated
public boolean getCreated()
- Specified by:
getCreatedin classUIComponentTagBase- Returns:
-
getParentUIComponentClassicTagBase
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(javax.servlet.jsp.PageContext pageContext)
-
getJspId
public String getJspId()
-
setJspId
public void setJspId(String jspId)
- Specified by:
setJspIdin interfacejavax.servlet.jsp.tagext.JspIdConsumer
-
addChild
protected void addChild(UIComponent child)
- Specified by:
addChildin classUIComponentTagBase
-
addFacet
protected void addFacet(String name)
- Specified by:
addFacetin classUIComponentTagBase
-
getComponentInstance
public UIComponent getComponentInstance()
Return the UIComponent instance associated with this tag.- Specified by:
getComponentInstancein classUIComponentTagBase- Returns:
- a UIComponent, never null.
-
getFacesContext
protected FacesContext getFacesContext()
- Specified by:
getFacesContextin classUIComponentTagBase- Returns:
-
getIndexOfNextChildTag
protected int getIndexOfNextChildTag()
- Specified by:
getIndexOfNextChildTagin classUIComponentTagBase- Returns:
-
setId
public void setId(String id)
- Specified by:
setIdin classUIComponentTagBase
-
getId
protected String getId()
Return the id (if any) specified as an xml attribute on this tag.
-
getFacesJspId
protected String getFacesJspId()
-
setBodyContent
public void setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
- Specified by:
setBodyContentin interfacejavax.servlet.jsp.tagext.BodyTag
-
doInitBody
public void doInitBody() throws javax.servlet.jsp.JspException- Specified by:
doInitBodyin interfacejavax.servlet.jsp.tagext.BodyTag- Throws:
javax.servlet.jsp.JspException
-
doAfterBody
public int doAfterBody() throws javax.servlet.jsp.JspException- Specified by:
doAfterBodyin interfacejavax.servlet.jsp.tagext.IterationTag- Throws:
javax.servlet.jsp.JspException
-
setPageContext
public void setPageContext(javax.servlet.jsp.PageContext pageContext)
Standard method invoked by the JSP framework to inform this tag of the PageContext associated with the jsp page currently being processed.- Specified by:
setPageContextin interfacejavax.servlet.jsp.tagext.Tag
-
getParent
public javax.servlet.jsp.tagext.Tag getParent()
Returns the enclosing JSP tag object. Note that this is not necessarily a JSF tag.- Specified by:
getParentin interfacejavax.servlet.jsp.tagext.Tag
-
setParent
public void setParent(javax.servlet.jsp.tagext.Tag tag)
Standard method invoked by the JSP framework to inform this tag of the enclosing JSP tag object.- Specified by:
setParentin interfacejavax.servlet.jsp.tagext.Tag
-
getBodyContent
public javax.servlet.jsp.tagext.BodyContent getBodyContent()
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Throws:
javax.servlet.jsp.JspException
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Throws:
javax.servlet.jsp.JspException
-
getDoAfterBodyValue
protected int getDoAfterBodyValue() throws javax.servlet.jsp.JspException- Throws:
javax.servlet.jsp.JspException
-
getDoStartValue
protected int getDoStartValue() throws javax.servlet.jsp.JspExceptionGet the value to be returned by the doStartTag method to the JSP framework. Subclasses which wish to use the inherited doStartTag but control whether the tag is permitted to contain nested tags or not can just override this method to return Tag.SOME_CONSTANT.- Returns:
- BodyTag.EVAL_BODY_BUFFERED
- Throws:
javax.servlet.jsp.JspException
-
getDoEndValue
protected int getDoEndValue() throws javax.servlet.jsp.JspExceptionGet the value to be returned by the doEndTag method to the JSP framework. Subclasses which wish to use the inherited doEndTag but control whether the tag is permitted to contain nested tags or not can just override this method to return Tag.SOME_CONSTANT.- Returns:
- Tag.EVAL_PAGE
- Throws:
javax.servlet.jsp.JspException
-
getFacetName
protected String getFacetName()
-
createVerbatimComponentFromBodyContent
protected UIComponent createVerbatimComponentFromBodyContent()
Creates a UIComponent from the BodyContent
-
createVerbatimComponent
protected UIOutput createVerbatimComponent()
Creates a transient UIOutput using the Application, with the following characteristics:
componentTypeisjavax.faces.HtmlOutputText.transientistrue.escapeisfalse.idisFacesContext.getViewRoot().createUniqueId()
-
addVerbatimBeforeComponent
protected void addVerbatimBeforeComponent(UIComponentClassicTagBase parentTag, UIComponent verbatimComp, UIComponent component)
-
addVerbatimAfterComponent
protected void addVerbatimAfterComponent(UIComponentClassicTagBase parentTag, UIComponent verbatim, UIComponent component)
Add verbatim as a sibling of _componentInstance in _componentInstance in the parent's child list. verbatim is added to the list at the position immediatly following _componentInstance.
-
setupResponseWriter
protected void setupResponseWriter()
Deprecated.the ResponseWriter is now set byViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
-
encodeBegin
protected void encodeBegin() throws IOExceptionInvoke encodeBegin on the associated UIComponent. Subclasses can override this method to perform custom processing before or after the UIComponent method invocation.- Throws:
IOException
-
encodeChildren
protected void encodeChildren() throws IOExceptionInvoke encodeChildren on the associated UIComponent. Subclasses can override this method to perform custom processing before or after the UIComponent method invocation. This is only invoked for components whose getRendersChildren method returns true.- Throws:
IOException
-
encodeEnd
protected void encodeEnd() throws IOExceptionInvoke encodeEnd on the associated UIComponent. Subclasses can override this method to perform custom processing before or after the UIComponent method invocation.- Throws:
IOException
-
findComponent
protected UIComponent findComponent(FacesContext context) throws javax.servlet.jsp.JspException
Return the corresponding UIComponent for this tag, creating it if necessary.If this is not the first time this method has been called, then return the cached _componentInstance instance found last time.
If this is not the first time this view has been seen, then locate the existing _componentInstance using the id attribute assigned to this tag and return it. Note that this is simple for components with user-assigned ids. For components with generated ids, the "reattachment" relies on the fact that UIViewRoot will generate the same id values for tags in this page as it did when first generating the view. For this reason all JSF tags within a JSTL "c:if" are required to have explicitly-assigned ids.
Otherwise create the _componentInstance, populate its properties from the xml attributes on this JSP tag and attach it to its parent.
When a _componentInstance is found or created the parent JSP tag is also told that the _componentInstance has been "seen". When the parent tag ends it will delete any components which were in the view previously but have not been seen this time; see doEndTag for more details.
- Throws:
javax.servlet.jsp.JspException
-
hasBinding
protected abstract boolean hasBinding()
-
getPreviousOut
public javax.servlet.jsp.JspWriter getPreviousOut()
-
-