org.apache.commons.jelly
Class DynaBeanTagSupport

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by org.apache.commons.jelly.DynaTagSupport
          extended by org.apache.commons.jelly.DynaBeanTagSupport
All Implemented Interfaces:
DynaTag, Tag
Direct Known Subclasses:
DynamicBeanTag, DynamicDynaBeanTag

public abstract class DynaBeanTagSupport
extends DynaTagSupport

DynaBeanTag is a DynaTag implementation which uses a DynaBean to store its attribute values in. Derived tags can then process this DynaBean in any way it wishes.

Version:
$Revision: 1807798 $
Author:
James Strachan

Field Summary
private  org.apache.commons.beanutils.DynaBean dynaBean
          the DynaBean which is used to store the attributes of this tag.
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
DynaBeanTagSupport()
           
DynaBeanTagSupport(org.apache.commons.beanutils.DynaBean dynaBean)
           
 
Method Summary
 void beforeSetAttributes()
          Callback to allow processing to occur before the attributes are about to be set
 java.lang.Class getAttributeType(java.lang.String name)
           
 org.apache.commons.beanutils.DynaBean getDynaBean()
           
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets an attribute value of this tag before the tag is invoked
 void setContext(JellyContext context)
          Sets the context in which the tag will be run.
 void setDynaBean(org.apache.commons.beanutils.DynaBean dynaBean)
          Sets the DynaBean which is used to store the attributes of this tag
 
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
doTag, getBody, getContext, getParent, invokeBody, setBody, setParent
 

Field Detail

dynaBean

private org.apache.commons.beanutils.DynaBean dynaBean
the DynaBean which is used to store the attributes of this tag.

Constructor Detail

DynaBeanTagSupport

public DynaBeanTagSupport()

DynaBeanTagSupport

public DynaBeanTagSupport(org.apache.commons.beanutils.DynaBean dynaBean)
Method Detail

setContext

public void setContext(JellyContext context)
                throws JellyTagException
Sets the context in which the tag will be run.

Specified by:
setContext in interface Tag
Overrides:
setContext in class TagSupport
Throws:
JellyTagException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
                  throws JellyTagException
Sets an attribute value of this tag before the tag is invoked

Throws:
JellyTagException

getAttributeType

public java.lang.Class getAttributeType(java.lang.String name)
                                 throws JellyTagException
Specified by:
getAttributeType in interface DynaTag
Overrides:
getAttributeType in class DynaTagSupport
Returns:
the type of the given attribute. By default just return Object.class if this is not known.
Throws:
JellyTagException

getDynaBean

public org.apache.commons.beanutils.DynaBean getDynaBean()
Returns:
the DynaBean which is used to store the attributes of this tag

setDynaBean

public void setDynaBean(org.apache.commons.beanutils.DynaBean dynaBean)
Sets the DynaBean which is used to store the attributes of this tag


beforeSetAttributes

public void beforeSetAttributes()
                         throws JellyTagException
Callback to allow processing to occur before the attributes are about to be set

Throws:
JellyTagException