Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cocoon.forms.datatype
Class StaticSelectionList

    java.lang.Object
      org.apache.cocoon.forms.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.java 587759 2007-10-24 03:00:37Z vgritsenko $

Nested Class Summary
`class` | `StaticSelectionList.SelectionListItem`

Field Summary

Fields inherited from interface org.apache.cocoon.forms.datatype.SelectionList
`ITEM_EL, LABEL_EL, SELECTION_LIST_EL`

Constructor Summary
`StaticSelectionList(Datatype datatype)`

Method Summary
`void` | `addItem(Object value)` Adds a new item to this selection list, where the label is set to the toString() result of the value.
`void` | `addItem(Object value, String label)` Adds a new item to this selection list.
`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

### addItem

    public void addItem(Object value,
                        String 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 String label, can be null

### addItem

    public void addItem(Object value)

  Adds a new item to this selection list, where the label is set to the toString() result of the value.

  Parameters:
    `value` - a value of the correct type (i.e. the type with which this selectionlist is associated)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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