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:
  DynaTag, BeanSource, CollectionTag, 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: 155420 $
Author:
  James Strachan

### Field Summary

### Fields inherited from class org.apache.commons.jelly.TagSupport

`body, context, parent`

### Constructor Summary

Constructors
Constructor and Description
`UseListTag()`

### Method Summary

Methods
`void` `addItem(Object value)`
`Class` `getAttributeType(String name)`
`protected Class` `getDefaultClass()` Allows derived classes to provide a default bean implementation class
`List` `getList()`
`protected void` `processBean(String var, Object bean)` By default this will export the bean using the given variable if it is defined.
`protected void` `setBeanProperties(Object bean, 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.MapTagSupport

`createAttributes, getAttributes, setAttribute`

### 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`

### Methods inherited from interface org.apache.commons.jelly.Tag

`getBody, getContext, getParent, invokeBody, setBody, setContext, setParent`

### Constructor Detail

#### UseListTag

    public UseListTag()

### Method Detail

#### getList

    public List getList()

#### addItem

    public void addItem(Object value)

Specified by:
  `addItem` in interface `CollectionTag`

#### getAttributeType

    public Class getAttributeType(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`

#### setBeanProperties

    protected void setBeanProperties(Object bean,
                         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`
Throws:
  `JellyTagException`

#### processBean

    protected void processBean(String var,
                   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`
Throws:
  `JellyTagException`

#### getDefaultClass

    protected Class getDefaultClass()

Description copied from class: `UseBeanTag`
Allows derived classes to provide a default bean implementation class

Overrides:
  `getDefaultClass` in class `UseBeanTag`