cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ebert <>
Subject javaflow and selection list problem
Date Fri, 11 Mar 2005 10:44:14 GMT

i have a problem using a javaflow class with a cform selection-list.
i want to take some value from an xml-file with jdom and pass them to
a cform with a selection list. the problem is, that the created list
has no entries.

the javascript examples don't help me much, because i don't know how
to construct the equivalent java object as argument for the method.

my java class looks like:


import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;

public class FormTest extends AbstractContinuable
        public void dodeleteJahr()
                        FormInstance form = null;

                        form = new FormInstance("delete_jahr_form.xml");

                        Document jdoc = null;
                        SAXBuilder saxBuilder = new SAXBuilder();
                                jdoc ="navigation.xml");
                        catch (JDOMException jdome) 
//                              ...
                        catch (IOException ioe) 
//                              ...
                        VarMap map = new VarMap();
                        for(int i = 0; i < jdoc.getRootElement().getChildren("jahr").size()+1;
                                map.add("jahr"+i, "wert "+i);
              "templates/delete_jahr_template.xml", new VarMap("jahrList",

and my cform-document looks like:

<?xml version="1.0" encoding="UTF-8"?>
<fd:form xmlns:fd="">
                <fd:field id="delete_jahr">
                        <fd:label>Wählen Sie das Jahr, das Sie löschen möchten: </fd:label>
                        <fd:datatype base="string"/>                    
                        <fd:selection-list  type="flow-jxpath" list-path="jahrList" value-path="value"
label-path="label" />

The created list contains no items. I know that I have to pass a
VarMap to the method, but I don't know how the VarMap has
to look like.

I only found examples with javascript, but I want to avoid using

Is there anyone who has experiences with this kind of problem?

Best regards,


Michael Ebert

Ebert + Grüntjes GbR
Zeil 65-69
60313 Frankfurt
Tel.: +49 69 928879-17

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message