org.apache.commons.jelly.tags.define
Class DynaBeanTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by org.apache.commons.jelly.tags.define.DefineTagSupport
          extended by org.apache.commons.jelly.tags.define.DynaBeanTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class DynaBeanTag
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: 155420 $
Author:
James Strachan

Field Summary
private  java.util.Map attributes
          the attribute definitions for this dynamic tag
private  org.apache.commons.beanutils.DynaClass dynaClass
          the DyanClass to bind to the tag
private static java.util.Map EMPTY_MAP
          An empty Map as I think Collections.EMPTY_MAP is only JDK 1.3 onwards
private static org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
private  java.lang.String name
          the name of the tag to create
private  java.lang.String varAttribute
          the name of the attribute used for the variable name
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
DynaBeanTag()
           
 
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)
           
 org.apache.commons.beanutils.DynaClass getDynaClass()
          Returns the dynaClass.
 void setDynaClass(org.apache.commons.beanutils.DynaClass dynaClass)
          Sets the DynaClass which will be bound to this dynamic 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.tags.define.DefineTagSupport
getTagLibrary
 
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
 

Field Detail

log

private static final org.apache.commons.logging.Log log
The Log to which logging calls will be made.


EMPTY_MAP

private static final java.util.Map EMPTY_MAP
An empty Map as I think Collections.EMPTY_MAP is only JDK 1.3 onwards


name

private java.lang.String name
the name of the tag to create


dynaClass

private org.apache.commons.beanutils.DynaClass dynaClass
the DyanClass to bind to the tag


varAttribute

private java.lang.String varAttribute
the name of the attribute used for the variable name


attributes

private java.util.Map attributes
the attribute definitions for this dynamic tag

Constructor Detail

DynaBeanTag

public DynaBeanTag()
Method Detail

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
Throws:
org.apache.commons.jelly.MissingAttributeException
org.apache.commons.jelly.JellyTagException

setName

public void setName(java.lang.String name)
Sets the name of the tag to create


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'.


getDynaClass

public org.apache.commons.beanutils.DynaClass getDynaClass()
Returns the dynaClass.

Returns:
DynaClass

setDynaClass

public void setDynaClass(org.apache.commons.beanutils.DynaClass dynaClass)
Sets the DynaClass which will be bound to this dynamic tag.