org.apache.cocoon.woody.datatype
Class StaticSelectionList

java.lang.Object
  extended by org.apache.cocoon.woody.datatype.StaticSelectionList
All Implemented Interfaces:
SelectionList

public class StaticSelectionList
extends Object
implements SelectionList

An implementation of a SelectionList. Create instances of this class by using the SelectionListBuilder. This implementation is called "Static" because the items in the list are build once from its source, and then list items are cached as part of this object. In contrast, the DynamicSelectionList will retrieve its content from its source each time it's needed.

Version:
$Id: StaticSelectionList.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Nested Class Summary
 class StaticSelectionList.SelectionListItem
           
 
Field Summary
 
Fields inherited from interface org.apache.cocoon.woody.datatype.SelectionList
ITEM_EL, LABEL_EL, SELECTION_LIST_EL
 
Constructor Summary
StaticSelectionList(Datatype datatype)
           
 
Method Summary
 void addItem(Object value, XMLizable label)
          Adds a new item to this selection list.
 void generateSaxFragment(ContentHandler contentHandler, Locale locale)
           
 Datatype getDatatype()
           
 List getItems()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticSelectionList

public StaticSelectionList(Datatype datatype)
Method Detail

getDatatype

public Datatype getDatatype()
Specified by:
getDatatype in interface SelectionList

generateSaxFragment

public void generateSaxFragment(ContentHandler contentHandler,
                                Locale locale)
                         throws SAXException
Specified by:
generateSaxFragment in interface SelectionList
Throws:
SAXException

getItems

public List getItems()

addItem

public void addItem(Object value,
                    XMLizable label)
Adds a new item to this selection list.

Parameters:
value - a value of the correct type (i.e. the type with which this selectionlist is associated)
label - a SAX-fragment such as a SaxBuffer, can be null


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.