org.apache.commons.jelly.tags.core
Class UseListTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.DynaTagSupport
|
+--org.apache.commons.jelly.MapTagSupport
|
+--org.apache.commons.jelly.tags.core.UseBeanTag
|
+--org.apache.commons.jelly.tags.core.UseListTag
- All Implemented Interfaces:
- BeanSource, CollectionTag, DynaTag, Tag
- public class UseListTag
- extends UseBeanTag
- implements CollectionTag
A tag which creates a List implementation and optionally
adds all of the elements identified by the items attribute.
The exact implementation of List can be specified via the
class attribute
- Version:
- $Revision: 1.3 $
- Author:
- James Strachan
Method Summary |
void |
addItem(java.lang.Object value)
|
java.lang.Class |
getAttributeType(java.lang.String name)
|
protected java.lang.Class |
getDefaultClass()
Allows derived classes to provide a default bean implementation class |
java.util.List |
getList()
|
protected void |
processBean(java.lang.String var,
java.lang.Object bean)
By default this will export the bean using the given variable if it is defined. |
protected void |
setBeanProperties(java.lang.Object bean,
java.util.Map attributes)
Sets the properties on the bean. |
Methods inherited from class org.apache.commons.jelly.tags.core.UseBeanTag |
addIgnoreProperty, convertToClass, doTag, getBean, getIgnorePropertySet, isIgnoreUnknownProperties, loadClass, newInstance, setBean, setIgnoreUnknownProperties, validateBeanProperties |
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 |
UseListTag
public UseListTag()
getList
public java.util.List getList()
addItem
public void addItem(java.lang.Object value)
- Specified by:
addItem
in interface CollectionTag
- Following copied from interface:
org.apache.commons.jelly.impl.CollectionTag
- Returns:
- adds an item to the tags collection
getAttributeType
public java.lang.Class getAttributeType(java.lang.String name)
throws JellyTagException
- Overrides:
getAttributeType
in class DynaTagSupport
- Following copied from class:
org.apache.commons.jelly.DynaTagSupport
- Returns:
- the type of the given attribute. By default just return
Object.class if this is not known.
setBeanProperties
protected void setBeanProperties(java.lang.Object bean,
java.util.Map attributes)
throws JellyTagException
- Description copied from class:
UseBeanTag
- Sets the properties on the bean. Derived tags could implement some custom
type conversion etc.
This method ignores all property names in the Set returned by
UseBeanTag.getIgnorePropertySet()
.
- Overrides:
setBeanProperties
in class UseBeanTag
processBean
protected void processBean(java.lang.String var,
java.lang.Object bean)
throws JellyTagException
- Description copied from class:
UseBeanTag
- By default this will export the bean using the given variable if it is defined.
This Strategy method allows derived tags to process the beans in different ways
such as to register this bean with its parent tag etc.
- Overrides:
processBean
in class UseBeanTag
getDefaultClass
protected java.lang.Class getDefaultClass()
- Description copied from class:
UseBeanTag
- Allows derived classes to provide a default bean implementation class
- Overrides:
getDefaultClass
in class UseBeanTag
Copyright © 2002-2004 Apache Software Foundation. All Rights Reserved.