Package org.apache.commons.jelly.impl
Class DynamicBeanTag
java.lang.Object
org.apache.commons.jelly.TagSupport
org.apache.commons.jelly.DynaTagSupport
org.apache.commons.jelly.DynaBeanTagSupport
org.apache.commons.jelly.impl.DynamicBeanTag
- All Implemented Interfaces:
DynaTag
,BeanSource
,Tag
This tag is bound onto a Java Bean class. When the tag is invoked a bean will be created
using the tags attributes.
The bean may also have an invoke method called invoke(), run(), execute() or some such method
which will be invoked after the bean has been configured.
- Version:
- $Revision: 155420 $
- Author:
- James Strachan, Jason van Zyl
-
Field Summary
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, parent
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicBeanTag
(Class beanClass, Map attributes, String variableNameAttribute, Method method) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback to allow processing to occur before the attributes are about to be setvoid
Evaluates this tag after all the tags properties have been initialized.getBean()
void
setAttribute
(String name, Object value) Sets an attribute value of this tag before the tag is invokedMethods inherited from class org.apache.commons.jelly.DynaBeanTagSupport
getAttributeType, getDynaBean, setContext, setDynaBean
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setEscapeText, setParent, setTrim, trimBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.commons.jelly.Tag
getBody, getContext, getParent, invokeBody, setBody, setParent
-
Constructor Details
-
DynamicBeanTag
- Parameters:
beanClass
- Class of the bean that will receive the setter eventsattributes
-variableNameAttribute
-method
- method of the Bean to invoke after the attributes have been set. Can be null.
-
-
Method Details
-
beforeSetAttributes
Description copied from class:DynaBeanTagSupport
Callback to allow processing to occur before the attributes are about to be set- Overrides:
beforeSetAttributes
in classDynaBeanTagSupport
- Throws:
JellyTagException
-
setAttribute
Description copied from class:DynaBeanTagSupport
Sets an attribute value of this tag before the tag is invoked- Specified by:
setAttribute
in interfaceDynaTag
- Overrides:
setAttribute
in classDynaBeanTagSupport
- Throws:
JellyTagException
-
doTag
Description copied from interface:Tag
Evaluates this tag after all the tags properties have been initialized.- Specified by:
doTag
in interfaceTag
- Throws:
JellyTagException
-
getBean
- Specified by:
getBean
in interfaceBeanSource
- Returns:
- the bean that has just been created
-