org.apache.cocoon.forms.datatype
Class JavaScriptSelectionListBuilder
java.lang.Object
org.apache.cocoon.forms.datatype.JavaScriptSelectionListBuilder
- All Implemented Interfaces:
- SelectionListBuilder
- public class JavaScriptSelectionListBuilder
- extends Object
- implements SelectionListBuilder
Builds a selection list that will take its values from a JavaScript snippet.
The snippet runs in scope where the list filter (if any) and the view data are
available as filter
and viewData
respectively, along
with all flowscript functions. It must return a list of (value, label) pairs.
If an item has no label, its value is used as the label. If the declaration has
a catalogue
attribute, the labels are interpreted as i18n keys in
that catalogue.
Example:
<fd:selection-list type="flow-function">
return [ {value: 3, label: "three"}, {value:4} ];
</fd:selection-list>
- Since:
- 2.1.9
- Version:
- $Id: JavaScriptSelectionListBuilder.html 1304280 2012-03-23 11:18:01Z ilgrosso $
- See Also:
JavaScriptSelectionList
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaScriptSelectionListBuilder
public JavaScriptSelectionListBuilder()
build
public SelectionList build(Element selectionListElement,
Datatype datatype)
throws Exception
- Specified by:
build
in interface SelectionListBuilder
- Throws:
Exception
setProcessInfoProvider
public void setProcessInfoProvider(org.apache.cocoon.processing.ProcessInfoProvider processInfoProvider)
Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.