Class DelegatingMetaTagHandler

  • All Implemented Interfaces:
    Direct Known Subclasses:
    ComponentHandler, FaceletsAttachedObjectHandler

    public abstract class DelegatingMetaTagHandler
    extends MetaTagHandler

    Enable the Jakarta Faces implementation to provide the appropriate behavior for the kind of MetaTagHandler subclass for each kind of element in the view, while providing a base-class from which those wanting to make a Java language custom tag handler can inherit. The Jakarta Server Faces runtime provides the implementation of getTagHandlerDelegate() for the appropriate subclass.

    • Field Detail

      • delegateFactory

        protected TagHandlerDelegateFactory delegateFactory
        Class that defines methods relating to helping tag handler instances.
    • Constructor Detail

      • DelegatingMetaTagHandler

        public DelegatingMetaTagHandler​(TagConfig config)
        Instantiates this handler with the given config.
        config - the config used to instantiate this handler.
    • Method Detail

      • getTagHandlerDelegate

        protected abstract TagHandlerDelegate getTagHandlerDelegate()

        Get the tag handler delegate.

        Code that extends from DelegatingMetaTagHandler (directly or indirectly, as through extending ComponentHandler) must take care to decorate, not replace, the TagHandlerDelegate instance returned by this method. Failure to do so may produce unexpected results.

        the tag handler delegate.
      • isDisabled

        public boolean isDisabled​(FaceletContext ctx)
        Returns the value of the "disabled" attribute.
        ctx - the context used for resolving the underlying attribute.
        true if the "disabled" attribute has been set to true, false otherwise.
      • getBinding

        public TagAttribute getBinding()
        Return the "binding" attribute.
        the "binding" attribute.
      • getTag

        public Tag getTag()
        Return a reference to the Tag instance corresponding to this TagHandler instance.
        a reference to the Tag instance.
      • getTagId

        public String getTagId()
        Return the tag id from the TagConfig used to instantiate this handler.
        the tag id from the TagConfig.
      • getTagAttribute

        public TagAttribute getTagAttribute​(String localName)
        Return the named attribute from the tag attributes.
        localName - the name of the attribute.
        the named attribute from the tag attributes.
      • setAttributes

        public void setAttributes​(FaceletContext ctx,
                                  Object instance)
        Description copied from class: MetaTagHandler
        Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to the passed instance.
        setAttributes in class MetaTagHandler
        ctx - the Facelet context.
        instance - the instance.