org.apache.cocoon.forms.datatype
Class DynamicSelectionList

java.lang.Object
  extended byorg.apache.cocoon.forms.datatype.DynamicSelectionList
All Implemented Interfaces:
FilterableSelectionList, SelectionList

public class DynamicSelectionList
extends Object
implements FilterableSelectionList

SelectionList implementation that always reads its content from the source each time it is requested.

This list is filterable, and if a filter is provided, the "filter" parameter is appended to the URL, e.g. <fd:selection-list src="cocoon://pipeline.xml"/> will call, given the "foo" filter value, the URL cocoon://pipeline.xml?filter=foo.

Note: the class SelectionListBuilder also interprets the same fd:selection-list XML, so if anything changes here to how that XML is interpreted, it also needs to change over there and vice versa.

Version:
$Id: DynamicSelectionList.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Nested Class Summary
 class DynamicSelectionList.SelectionListHandler
          XMLConsumer used to handle selection lists generated on the fly.
 
Field Summary
 
Fields inherited from interface org.apache.cocoon.forms.datatype.SelectionList
ITEM_EL, LABEL_EL, SELECTION_LIST_EL
 
Constructor Summary
DynamicSelectionList(Datatype datatype, String src, boolean usePerRequestCache, XMLizer xmlizer, SourceResolver sourceResolver, HttpServletRequest request)
           
DynamicSelectionList(Datatype datatype, String src, XMLizer xmlizer, SourceResolver sourceResolver, HttpServletRequest request)
          Creates a DynamicSelectionList without caching
 
Method Summary
 void generateSaxFragment(ContentHandler contentHandler, Locale locale)
           
 void generateSaxFragment(ContentHandler contentHandler, Locale locale, String filter)
          Generates the filtered selection list
 Datatype getDatatype()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicSelectionList

public DynamicSelectionList(Datatype datatype,
                            String src,
                            boolean usePerRequestCache,
                            XMLizer xmlizer,
                            SourceResolver sourceResolver,
                            HttpServletRequest request)
Parameters:
datatype -
src -
usePerRequestCache -

DynamicSelectionList

public DynamicSelectionList(Datatype datatype,
                            String src,
                            XMLizer xmlizer,
                            SourceResolver sourceResolver,
                            HttpServletRequest request)
Creates a DynamicSelectionList without caching

Parameters:
datatype - -
src - -
Method Detail

getDatatype

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

generateSaxFragment

public void generateSaxFragment(ContentHandler contentHandler,
                                Locale locale,
                                String filter)
                         throws SAXException
Description copied from interface: FilterableSelectionList
Generates the filtered selection list

Specified by:
generateSaxFragment in interface FilterableSelectionList
Parameters:
contentHandler - where to stream the XML
locale - the locale to be used for value formatting
filter - the filter string
Throws:
SAXException

generateSaxFragment

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


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