public class DynamicTagLibrary extends TagLibrary
DynamicTagLibrary
represents a TagLibrary which
gets created by running a Jelly script.
Constructor and Description |
---|
DynamicTagLibrary() |
DynamicTagLibrary(String uri) |
Modifier and Type | Method and Description |
---|---|
Tag |
createTag(String name,
Attributes attributes)
Creates a new Tag for the given tag name if it exists
|
TagScript |
createTagScript(String name,
Attributes attributes)
Creates a new script to execute the given tag name and attributes
|
DynamicTagLibrary |
find(String name)
Returns the tag library instance which contains the named tag.
|
Script |
getDynamicTag(String name)
Returns the script associated with the given tag name
|
TagLibrary |
getParent()
Returns the parent library which will be used to resolve unknown tags.
|
String |
getUri() |
void |
registerBeanTag(String name,
TagFactory factory)
Creates a new Jelly Bean Tag with the given name
|
void |
registerDynamicTag(String name,
Script template)
Creates a new tag with the given name and template
|
void |
setParent(TagLibrary parent)
Sets the parent to inherit tags from that are not defined in this library.
|
void |
setUri(String uri) |
createExpression, getExpressionFactory, getTagClasses, registerTag, registerTagFactory
public DynamicTagLibrary()
public DynamicTagLibrary(String uri)
public TagScript createTagScript(String name, Attributes attributes) throws JellyException
createTagScript
in class TagLibrary
JellyException
public Tag createTag(String name, Attributes attributes) throws JellyException
createTag
in class TagLibrary
JellyException
public void registerDynamicTag(String name, Script template)
public void registerBeanTag(String name, TagFactory factory)
public Script getDynamicTag(String name)
name
- The tag namename
, or
null
if the tag doesn't exist or isn't a scriptpublic DynamicTagLibrary find(String name)
name
- The tag namenull
if the tag is not registered.public String getUri()
public void setUri(String uri)
public TagLibrary getParent()
public void setParent(TagLibrary parent)
parent
- The parent to setCopyright © 2014 Apache Software Foundation. All rights reserved.