1 16 package org.apache.cocoon.woody.datatype; 17 18 import org.apache.avalon.framework.context.Context; 19 import org.apache.avalon.framework.context.ContextException; 20 import org.apache.avalon.framework.context.Contextualizable; 21 import org.apache.cocoon.woody.util.DomHelper; 22 import org.w3c.dom.Element ; 23 24 47 public class FlowJXPathSelectionListBuilder implements SelectionListBuilder, Contextualizable { 48 49 private Context context; 50 51 public void contextualize(Context context) throws ContextException { 52 this.context = context; 53 } 54 55 public SelectionList build(Element selectionListElement, Datatype datatype) throws Exception { 56 57 String listPath = DomHelper.getAttribute(selectionListElement, "list-path"); 58 String keyPath = DomHelper.getAttribute(selectionListElement, "value-path"); 59 String valuePath = DomHelper.getAttribute(selectionListElement, "label-path"); 60 61 return new FlowJXPathSelectionList(context, listPath, keyPath, valuePath, datatype); 62 } 63 64 } 65 | Popular Tags |