Class MorphTagLibrary


  • public class MorphTagLibrary
    extends org.apache.commons.jelly.TagLibrary
    Jelly tag library for literal-like tags, with an ability to add arbitrary attributes taken from a map.

    Tags from this namespace ("jelly:hudson.util.jelly.MorphTagLibrary") behaves mostly like literal static tags, except it interprets two attributes "ATTRIBUTES" and "EXCEPT" in a special way. The "ATTRIBUTES" attribute should have a Jelly expression that points to a Map object, and the contents of the map are added as attributes of this tag, with the exceptions of entries whose key values are listed in the "EXCEPT" attribute. The "EXCEPT" attribute takes a white-space separated list of attribute names that should be ignored even if it's in the map.

    The explicit literal attributes, if specified, always take precedence over the dynamic attributes added by the map.

    See textbox.jelly as an example of using this tag library.

    Since:
    1.342
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • MorphTagLibrary

        public MorphTagLibrary()
    • Method Detail

      • createTag

        public org.apache.commons.jelly.Tag createTag​(String name,
                                                      Attributes attributes)
                                               throws org.apache.commons.jelly.JellyException
        This code is really only used for dealing with dynamic tag libraries, so no point in implementing this for statically used tag libraries.
        Overrides:
        createTag in class org.apache.commons.jelly.TagLibrary
        Throws:
        org.apache.commons.jelly.JellyException
      • createTagScript

        public org.apache.commons.jelly.impl.TagScript createTagScript​(String tagName,
                                                                       Attributes attributes)
                                                                throws org.apache.commons.jelly.JellyException
        Overrides:
        createTagScript in class org.apache.commons.jelly.TagLibrary
        Throws:
        org.apache.commons.jelly.JellyException