Class UIComponentTagBase

  • All Implemented Interfaces:
    JspTag
    Direct Known Subclasses:
    UIComponentClassicTagBase


    public abstract class UIComponentTagBase
    extends java.lang.Object
    implements JspTag

    UIComponentTagBase is the base class for all JSP tags that correspond to a UIComponent instance in the view. This base class allows a single view to be described in a JSP page consisting of both UIComponentELTag and UIComponentTag instances.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.logging.Logger log  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void addChild​(UIComponent child)
      Add the component identifier of the specified UIComponent to the list of component identifiers created or located by nested UIComponentTags processing this request.
      protected abstract void addFacet​(java.lang.String name)
      Add the facet name of the specified facet to the list of facet names created or located by nested UIComponentTags processing this request.
      abstract UIComponent getComponentInstance​()
      Return the UIComponent instance that is associated with this tag instance.
      abstract java.lang.String getComponentType​()
      Return the component type for the component that is or will be bound to this tag.
      abstract boolean getCreated​()
      Return true if we dynamically created a new component instance during execution of this tag.
      protected ELContext getELContext​()
      Return the ELContext for the FacesContext for this request.
      protected abstract FacesContext getFacesContext​()
      Return the FacesContext instance for the current request.
      protected abstract int getIndexOfNextChildTag​()
      Return the index of the next child to be added as a child of this tag.
      abstract 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.
      abstract void setId​(java.lang.String id)
      Set the component identifier for the component corresponding to this tag instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected static final java.util.logging.Logger log
    • Constructor Detail

      • UIComponentTagBase

        public UIComponentTagBase​()
    • Method Detail

      • getFacesContext

        protected abstract FacesContext getFacesContext​()

        Return the FacesContext instance for the current request. This value will be non-null only from the beginning of doStartTag() through the end of doEndTag() for each tag instance.

        Returns:
        the FacesContext for the current request.
      • getELContext

        protected ELContext getELContext​()

        Return the ELContext for the FacesContext for this request.

        This is a convenience for getFacesContext().getELContext().

        Returns:
        the {code ELContext} for this FacesContext
      • addChild

        protected abstract void addChild​(UIComponent child)

        Add the component identifier of the specified UIComponent to the list of component identifiers created or located by nested UIComponentTags processing this request.

        Parameters:
        child - New child whose identifier should be added
      • addFacet

        protected abstract void addFacet​(java.lang.String name)

        Add the facet name of the specified facet to the list of facet names created or located by nested UIComponentTags processing this request.

        Parameters:
        name - Facet name to be added
      • setId

        public abstract void setId​(java.lang.String id)

        Set the component identifier for the component corresponding to this tag instance. If the argument begins with UIViewRoot.UNIQUE_ID_PREFIX throw an IllegalArgumentException

        Parameters:
        id - The new component identifier. This may not start with UIViewRoot.UNIQUE_ID_PREFIX.
        Throws:
        java.lang.IllegalArgumentException - if the argument is non-null and starts with UIViewRoot.UNIQUE_ID_PREFIX.
      • getComponentType

        public abstract java.lang.String getComponentType​()

        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.

        Returns:
        the component type
      • getRendererType

        public abstract 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. Subclasses must override this method to return the appropriate value.

        Returns:
        the renderer type
      • getComponentInstance

        public abstract UIComponent getComponentInstance​()

        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.

        Returns:
        the component
      • getCreated

        public abstract boolean getCreated​()

        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.

        Returns:
        the result as specified above
      • getIndexOfNextChildTag

        protected abstract int getIndexOfNextChildTag​()

        Return the index of the next child to be added as a child of this tag. The default implementation maintains a list of created components and returns the size of the list.

        Returns:
        the index