Class DynamicTagLibrary


  • public class DynamicTagLibrary
    extends TagLibrary

    DynamicTagLibrary represents a TagLibrary which gets created by running a Jelly script.

    Version:
    $Revision: 155420 $
    Author:
    James Strachan
    • Constructor Detail

      • DynamicTagLibrary

        public DynamicTagLibrary()
      • DynamicTagLibrary

        public DynamicTagLibrary​(String uri)
    • Method Detail

      • registerDynamicTag

        public void registerDynamicTag​(String name,
                                       Script template)
        Creates a new tag with the given name and template
      • registerBeanTag

        public void registerBeanTag​(String name,
                                    TagFactory factory)
        Creates a new Jelly Bean Tag with the given name
      • getDynamicTag

        public Script getDynamicTag​(String name)
        Returns the script associated with the given tag name
        Parameters:
        name - The tag name
        Returns:
        The script associated with name, or null if the tag doesn't exist or isn't a script
      • find

        public DynamicTagLibrary find​(String name)
        Returns the tag library instance which contains the named tag.

        If the tag is not registered within this library, the set of parent libraries will be searched.

        Parameters:
        name - The tag name
        Returns:
        The tag library containing the named tag, or null if the tag is not registered.
      • getUri

        public String getUri()
      • setUri

        public void setUri​(String uri)
      • getParent

        public TagLibrary getParent()
        Returns the parent library which will be used to resolve unknown tags.
        Returns:
        TagLibrary
      • setParent

        public void setParent​(TagLibrary parent)
        Sets the parent to inherit tags from that are not defined in this library.
        Parameters:
        parent - The parent to set