Package org.apache.commons.jelly.impl
Class DynamicTagLibrary
java.lang.Object
org.apache.commons.jelly.TagLibrary
org.apache.commons.jelly.impl.DynamicTagLibrary
DynamicTagLibrary represents a TagLibrary which
gets created by running a Jelly script.
- Version:
- $Revision: 155420 $
- Author:
- James Strachan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTag(String name, Attributes attributes) Creates a new Tag for the given tag name if it existscreateTagScript(String name, Attributes attributes) Creates a new script to execute the given tag name and attributesReturns the tag library instance which contains the named tag.getDynamicTag(String name) Returns the script associated with the given tag nameReturns the parent library which will be used to resolve unknown tags.getUri()voidregisterBeanTag(String name, TagFactory factory) Creates a new Jelly Bean Tag with the given namevoidregisterDynamicTag(String name, Script template) Creates a new tag with the given name and templatevoidsetParent(TagLibrary parent) Sets the parent to inherit tags from that are not defined in this library.voidMethods inherited from class org.apache.commons.jelly.TagLibrary
createExpression, getExpressionFactory, getTagClasses, registerTag, registerTagFactory
-
Constructor Details
-
DynamicTagLibrary
public DynamicTagLibrary() -
DynamicTagLibrary
-
-
Method Details
-
createTagScript
Creates a new script to execute the given tag name and attributes- Overrides:
createTagScriptin classTagLibrary- Throws:
JellyException
-
createTag
Creates a new Tag for the given tag name if it exists- Overrides:
createTagin classTagLibrary- Throws:
JellyException
-
registerDynamicTag
Creates a new tag with the given name and template -
registerBeanTag
Creates a new Jelly Bean Tag with the given name -
getDynamicTag
Returns the script associated with the given tag name- Parameters:
name- The tag name- Returns:
- The script associated with
name, ornullif the tag doesn't exist or isn't a script
-
find
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
nullif the tag is not registered.
-
getUri
-
setUri
-
getParent
Returns the parent library which will be used to resolve unknown tags.- Returns:
- TagLibrary
-
setParent
Sets the parent to inherit tags from that are not defined in this library.- Parameters:
parent- The parent to set
-