org.apache.cocoon.woody.datatype
Class FlowJXPathSelectionListBuilder

java.lang.Object
  extended by org.apache.cocoon.woody.datatype.FlowJXPathSelectionListBuilder
All Implemented Interfaces:
Contextualizable, SelectionListBuilder

public class FlowJXPathSelectionListBuilder
extends Object
implements SelectionListBuilder, Contextualizable

Builds a selection list that will take its values from the flow page data. The items list and, for each item, its value and label, are fetched using JXPath expressions.

If an item has no label, its value is used as the label.

Example:

   <wd:selection-list type="flow-jxpath"
       list-path="selectList" value-path="value" label-path="label"/gt;
 
Flow script:
   var data = {
      selectList: [{value:3, label:"three"}, {value:4}]
   };
   form.showForm("form.html", data);
 

Version:
CVS $Id: FlowJXPathSelectionListBuilder.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Sylvain Wallez
See Also:
FlowJXPathSelectionList

Field Summary
 
Fields inherited from interface org.apache.cocoon.woody.datatype.SelectionListBuilder
ROLE
 
Constructor Summary
FlowJXPathSelectionListBuilder()
           
 
Method Summary
 SelectionList build(Element selectionListElement, Datatype datatype)
           
 void contextualize(Context context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowJXPathSelectionListBuilder

public FlowJXPathSelectionListBuilder()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

build

public SelectionList build(Element selectionListElement,
                           Datatype datatype)
                    throws Exception
Specified by:
build in interface SelectionListBuilder
Throws:
Exception


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