|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.TagLibrary
org.apache.commons.jelly.impl.DynamicTagLibrary
public class DynamicTagLibrary
DynamicTagLibrary
represents a TagLibrary which
gets created by running a Jelly script.
Field Summary | |
---|---|
private TagLibrary |
parent
|
private java.util.Map |
templates
|
private java.lang.String |
uri
|
Constructor Summary | |
---|---|
DynamicTagLibrary()
|
|
DynamicTagLibrary(java.lang.String uri)
|
Method Summary | |
---|---|
Tag |
createTag(java.lang.String name,
org.xml.sax.Attributes attributes)
Creates a new Tag for the given tag name if it exists |
TagScript |
createTagScript(java.lang.String name,
org.xml.sax.Attributes attributes)
Creates a new script to execute the given tag name and attributes |
DynamicTagLibrary |
find(java.lang.String name)
Returns the tag library instance which contains the named tag. |
Script |
getDynamicTag(java.lang.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. |
java.lang.String |
getUri()
|
void |
registerBeanTag(java.lang.String name,
TagFactory factory)
Creates a new Jelly Bean Tag with the given name |
void |
registerDynamicTag(java.lang.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(java.lang.String uri)
|
Methods inherited from class org.apache.commons.jelly.TagLibrary |
---|
createExpression, getExpressionFactory, getTagClasses, registerTag, registerTagFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String uri
private java.util.Map templates
private TagLibrary parent
Constructor Detail |
---|
public DynamicTagLibrary()
public DynamicTagLibrary(java.lang.String uri)
Method Detail |
---|
public TagScript createTagScript(java.lang.String name, org.xml.sax.Attributes attributes) throws JellyException
createTagScript
in class TagLibrary
JellyException
public Tag createTag(java.lang.String name, org.xml.sax.Attributes attributes) throws JellyException
createTag
in class TagLibrary
JellyException
public void registerDynamicTag(java.lang.String name, Script template)
public void registerBeanTag(java.lang.String name, TagFactory factory)
public Script getDynamicTag(java.lang.String name)
name
- The tag name
name
, or
null
if the tag doesn't exist or isn't a scriptpublic DynamicTagLibrary find(java.lang.String name)
name
- The tag name
null
if the tag is not registered.public java.lang.String getUri()
public void setUri(java.lang.String uri)
public TagLibrary getParent()
public void setParent(TagLibrary parent)
parent
- The parent to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |