org.apache.tiles
Class ListAttribute

Package class diagram package ListAttribute
java.lang.Object
  extended by org.apache.tiles.Attribute
      extended by org.apache.tiles.ListAttribute
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ListAttribute

public class ListAttribute
extends Attribute

An attribute as a List. This attribute associates a name with a list. The list can be found by the property name. Elements in list are retrieved using List methods. This class is used to read configuration files.

Since:
2.1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tiles.Attribute
Attribute.AttributeType
 
Field Summary
 
Fields inherited from class org.apache.tiles.Attribute
expression, roles, value
 
Constructor Summary
ListAttribute()
          Constructor.
ListAttribute(java.util.List<? extends java.lang.Object> value)
          Constructor.
 
Method Summary
 void add(Attribute element)
          Add an element in list.
 void add(java.lang.Object value)
          Add an element in list.
 void addObject(java.lang.Object value)
          Add an element in list.
 void inherit(ListAttribute parent)
          Inherits elements present in a "parent" list attribute.
 boolean isInherit()
          If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here.
 void setInherit(boolean inherit)
          If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here.
 
Methods inherited from class org.apache.tiles.Attribute
createTemplateAttribute, createTemplateAttributeWithExpression, getExpression, getName, getRenderer, getRole, getRoles, getType, getValue, inherit, setBody, setExpression, setName, setRenderer, setRole, setRoles, setType, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListAttribute

public ListAttribute()
Constructor.

Since:
2.1.0

ListAttribute

public ListAttribute(java.util.List<? extends java.lang.Object> value)
Constructor.

Parameters:
value - List.
Since:
2.1.0
Method Detail

add

public void add(Attribute element)
Add an element in list. We use a property to avoid rewriting a new class.

Parameters:
element - XmlAttribute to add.
Since:
2.1.0

add

public void add(java.lang.Object value)
Add an element in list.

Parameters:
value - Object to add.
Since:
2.1.0

addObject

public void addObject(java.lang.Object value)
Add an element in list.

Parameters:
value - Object to add.
Since:
2.1.0

setInherit

public void setInherit(boolean inherit)
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here. By default, it is 'false'

Parameters:
inherit - The "inherit" value.
Since:
2.1.0

isInherit

public boolean isInherit()
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here. By default, it is 'false'

Returns:
inherit The "inherit" value.
Since:
2.1.0

inherit

public void inherit(ListAttribute parent)
Inherits elements present in a "parent" list attribute. The elements will be put before the ones already present.

Parameters:
parent - The parent list attribute.
Since:
2.1.0