org.apache.commons.jelly.tags.define
Class BeanTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.tags.define.DefineTagSupport
|
+--org.apache.commons.jelly.tags.define.BeanTag
- All Implemented Interfaces:
- org.apache.commons.jelly.Tag
- Direct Known Subclasses:
- ClassLoaderTag, JellyBeanTag
- public class BeanTag
- extends DefineTagSupport
Binds a Java bean to the given named Jelly tag so that the attributes of
the tag set the bean properties..
- Version:
- $Revision: 1.6 $
- Author:
- James Strachan
Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, shouldTrim |
Method Summary |
void |
addAttribute(org.apache.commons.jelly.impl.Attribute attribute)
Adds a new attribute definition to this dynamic tag |
void |
doTag(org.apache.commons.jelly.XMLOutput output)
|
java.lang.ClassLoader |
getClassLoader()
|
protected java.lang.reflect.Method |
getInvokeMethod(java.lang.Class theClass)
Extracts the invoke method for the class if one is used. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the ClassLoader to use to load the class. |
void |
setClassName(java.lang.String className)
Sets the Java class name to use for the tag |
void |
setName(java.lang.String name)
Sets the name of the tag to create |
void |
setVarAttribute(java.lang.String varAttribute)
Sets the name of the attribute used to define the bean variable that this dynamic
tag will output its results as. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanTag
public BeanTag()
addAttribute
public void addAttribute(org.apache.commons.jelly.impl.Attribute attribute)
- Adds a new attribute definition to this dynamic tag
doTag
public void doTag(org.apache.commons.jelly.XMLOutput output)
throws org.apache.commons.jelly.MissingAttributeException,
org.apache.commons.jelly.JellyTagException
- Overrides:
doTag
in class org.apache.commons.jelly.TagSupport
setName
public void setName(java.lang.String name)
- Sets the name of the tag to create
setClassName
public void setClassName(java.lang.String className)
- Sets the Java class name to use for the tag
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
- Sets the ClassLoader to use to load the class.
If no value is set then the current threads context class
loader is used.
getClassLoader
public java.lang.ClassLoader getClassLoader()
- Returns:
- the ClassLoader to use to load classes specified by this object,
the thread context loader if the context flag is set, or the class used to load this class.
setVarAttribute
public void setVarAttribute(java.lang.String varAttribute)
- Sets the name of the attribute used to define the bean variable that this dynamic
tag will output its results as. This defaults to 'var' though this property
can be used to change this if it conflicts with a bean property called 'var'.
getInvokeMethod
protected java.lang.reflect.Method getInvokeMethod(java.lang.Class theClass)
- Extracts the invoke method for the class if one is used.
Copyright © 2002-2004 Apache Software Foundation. All Rights Reserved.