Tag Documentation

[tag libraries] [tags]

The following document contains a summary of all theJellytag libraries.

Tag Libraries

[tag libraries] [tags]

LibraryDescription
jelly:define

Tag library which allows the creation of new tags using Jelly script itself.

jelly:define

Tag library which allows the creation of new tags using Jelly script itself.

Tag NameDescription
attributeThis tag is bound onto a Java Bean class. When the tag is invoked a bean will be createdusing the tags attributes.The bean may also have an invoke method called invoke(), run(), execute() or some such methodwhich will be invoked after the bean has been configured.
beanBinds a Java bean to the given named Jelly tag so that the attributes ofthe tag set the bean properties..
classLoaderCreates a new URLClassLoader to dynamicallyload tags froms.
dynaBeanBinds a Java bean to the given named Jelly tag so that the attributes ofthe tag set the bean properties..
extend<extend>is used to extend a dynamic tag defined in an inheriteddynamic tag library

invokeThe <invoke>tag will invoke a given Script instance.It can be used with the <script>tag which defines scriptsas variables that can later be invoked by this <invoke>tag.
invokeBody<invokeBody>tag is used inside a <tag>tag(i.e. the definition of a dynamic tag) to invoke the tags body whenthe tag is invoked.
jellyBeanBinds a Java bean to the given named Jelly tag so that the attributes ofthe tag set the bean properties. After the body of this tag is invokedthen the beans invoke() method will be called, if the bean has one.
script<script>tag is used to assign a Script objectto a variable. The script can then be called whenever the user wishesmaybe from inside an expression or more typically via the <invoke>tag.
super<super>tag is used to invoke a parent tag implementation, whena tag extends an existing tag
tag<tag>is used to define a new tagusing a Jelly script to implement the behaviour of the tag.Parameters can be passed into the new tag using normal XML attributenotations. Inside the body of the tag definition, the attributes canbe accessed as normal Jelly variables.
taglibThe <taglib>tag is used to define a new tag libraryusing a Jelly script. The tag library is identified by its URI.The tags for a taglib are declared using the org.apache.commons.jelly.tags.define.TagTag.You can 'inherit' tags from a previously defined taglib, as well,allowing runtime extension of tag libraries

Tags

[tag libraries] [tags]

define:attribute

This tag is bound onto a Java Bean class. When the tag is invoked a bean will be createdusing the tags attributes.The bean may also have an invoke method called invoke(), run(), execute() or some such methodwhich will be invoked after the bean has been configured.

Attribute NameTypeDescription
defaultValueorg.apache.commons.jelly.expression.ExpressionSets the default value of this attribute
escapeTextboolean
namejava.lang.StringSets the name of the attribute
requiredbooleanSets whether this attribute is mandatory or not
trimboolean

define:bean

Binds a Java bean to the given named Jelly tag so that the attributes ofthe tag set the bean properties..

Attribute NameTypeDescription
classLoaderjava.lang.ClassLoaderSets the ClassLoader to use to load the class.If no value is set then the current threads context classloader is used.
classNamejava.lang.StringSets the Java class name to use for the tag
escapeTextboolean
namejava.lang.StringSets the name of the tag to create
trimboolean
varAttributejava.lang.StringSets the name of the attribute used to define the bean variable that this dynamictag will output its results as. This defaults to 'var' though this propertycan be used to change this if it conflicts with a bean property called 'var'.

define:classLoader

Creates a new URLClassLoader to dynamicallyload tags froms.

Attribute NameTypeDescription
classLoaderjava.lang.ClassLoaderSets the ClassLoader to use to load the class.If no value is set then the current threads context classloader is used.
classNamejava.lang.StringSets the Java class name to use for the tag
escapeTextboolean
namejava.lang.StringSets the name of the tag to create
trimboolean
urljava.lang.String
varjava.lang.String
varAttributejava.lang.StringSets the name of the attribute used to define the bean variable that this dynamictag will output its results as. This defaults to 'var' though this propertycan be used to change this if it conflicts with a bean property called 'var'.

define:dynaBean

Binds a Java bean to the given named Jelly tag so that the attributes ofthe tag set the bean properties..

Attribute NameTypeDescription
dynaClassorg.apache.commons.beanutils.DynaClassSets the org.apache.commons.beanutils.DynaClasswhich will be bound to this dynamic tag.
escapeTextboolean
namejava.lang.StringSets the name of the tag to create
trimboolean
varAttributejava.lang.StringSets the name of the attribute used to define the bean variable that this dynamictag will output its results as. This defaults to 'var' though this propertycan be used to change this if it conflicts with a bean property called 'var'.

define:extend

<extend>is used to extend a dynamic tag defined in an inheriteddynamic tag library

Attribute NameTypeDescription
escapeTextboolean
namejava.lang.StringSets the name of the tag to create
trimboolean

define:invoke

The <invoke>tag will invoke a given Script instance.It can be used with the <script>tag which defines scriptsas variables that can later be invoked by this <invoke>tag.

Attribute NameTypeDescription
escapeTextboolean
scriptorg.apache.commons.jelly.ScriptSets the Script to be invoked by this tag, which typically has been previouslydefined by the use of the <script>tag.
trimboolean

define:invokeBody

<invokeBody>tag is used inside a <tag>tag(i.e. the definition of a dynamic tag) to invoke the tags body whenthe tag is invoked.

Attribute NameTypeDescription
escapeTextboolean
trimboolean

define:jellyBean

Binds a Java bean to the given named Jelly tag so that the attributes ofthe tag set the bean properties. After the body of this tag is invokedthen the beans invoke() method will be called, if the bean has one.

Attribute NameTypeDescription
classLoaderjava.lang.ClassLoaderSets the ClassLoader to use to load the class.If no value is set then the current threads context classloader is used.
classNamejava.lang.StringSets the Java class name to use for the tag
escapeTextboolean
methodjava.lang.StringSets the name of the method to invoke on the bean.This defaults to "run" so that Runnable objects can beinvoked, but this property can be set to whatever is required,such as "execute" or "invoke"
namejava.lang.StringSets the name of the tag to create
trimboolean
varAttributejava.lang.StringSets the name of the attribute used to define the bean variable that this dynamictag will output its results as. This defaults to 'var' though this propertycan be used to change this if it conflicts with a bean property called 'var'.

define:script

<script>tag is used to assign a Script objectto a variable. The script can then be called whenever the user wishesmaybe from inside an expression or more typically via the <invoke>tag.

Attribute NameTypeDescription
escapeTextboolean
trimboolean
varjava.lang.StringSets the variable name of the tag to create

define:super

<super>tag is used to invoke a parent tag implementation, whena tag extends an existing tag

Attribute NameTypeDescription
escapeTextboolean
trimboolean

define:tag

<tag>is used to define a new tagusing a Jelly script to implement the behaviour of the tag.Parameters can be passed into the new tag using normal XML attributenotations. Inside the body of the tag definition, the attributes canbe accessed as normal Jelly variables.

Attribute NameTypeDescription
escapeTextboolean
namejava.lang.StringSets the name of the tag to create
trimboolean

define:taglib

The <taglib>tag is used to define a new tag libraryusing a Jelly script. The tag library is identified by its URI.The tags for a taglib are declared using the org.apache.commons.jelly.tags.define.TagTag.You can 'inherit' tags from a previously defined taglib, as well,allowing runtime extension of tag libraries

Attribute NameTypeDescription
escapeTextboolean
inheritbooleanSets whether this dynamic tag should inherit from the current existing tag libraryof the same URI. This feature is enabled by default so that tags can easily besome tags can be overridden in an existing library, such as when making Mock Tags.You can disable this option if you want to disable any tags in the base library,turning them into just normal static XML.
trimboolean
urijava.lang.StringSets the namespace URI to register this new dynamic tag library with