Package org.apache.commons.jelly
Interface DynaTag
- All Superinterfaces:
Tag
- All Known Implementing Classes:
DynaBeanTagSupport
,DynamicBeanTag
,DynamicDynaBeanTag
,DynamicTag
,DynaTagSupport
,MapTagSupport
,SetPropertiesTag
,StaticTag
,UseBeanTag
,UseListTag
DynaTag
represents a Jelly custom tag which
can take its attributes dynamically and store them in some data structure.
Typically a DynaTag may use either a Map or a DynaBean to implement itself
which avoids writing explicit getter and setter methods for each possible attribute.
This kind of tag can be extremely useful when making HTML-like tags which generally output all the attributes which are used in the markup, except one or two special attributes are used, all others pass through.
- Version:
- $Revision: 155420 $
- Author:
- James Strachan
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeType
(String name) void
setAttribute
(String name, Object value) Sets an attribute value of this tag before the tag is invokedMethods inherited from interface org.apache.commons.jelly.Tag
doTag, getBody, getContext, getParent, invokeBody, setBody, setContext, setParent
-
Method Details
-
setAttribute
Sets an attribute value of this tag before the tag is invoked- Throws:
JellyTagException
-
getAttributeType
- Returns:
- the type of the given attribute. By default just return Object.class if this is not known. If this method returns Expression.class then the expression will not be evaluated and just passed in as the attribute value.
- Throws:
JellyTagException
-