cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noureddine BEKRAR" <nbek...@rennes.jouve.fr>
Subject MultiValueField's binding problem
Date Thu, 22 Jul 2004 09:55:10 GMT
Hi,

I have a very complicated problem with multivaluesfield's binding:
All is ok when i load the bean, but when i try to save the form i have this error message:

 org.apache.commons.jxpath.JXPathException: Exception trying to create xpath modulesIDsList[1];
Factory is not set on the JXPathContext - cannot create path: /modulesIDsList[1] 



this is my binding file :

<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" path="/" >

<fb:multi-value id="listModules" parent-path="." row-path="modulesIDsList" / >

</fb:context>

this is the bean:

public class MyBean{
     Collection modulesIDsList= new Vector();

 public Collection getModulesIDsList() {
            return modulesIDsList;
       }
    public void setModulesIDsList(Collection modulesIDsList) {
            this.modulesIDsList = modulesIDsList;
       }

}

and this is the defenition file:

....

<fd:multivaluefield id="listModules" required="true">

<fd:label>Modules :</fd:label>

<fd:datatype base="string">


</fd:datatype>

<fd:selection-list type="flow-jxpath" list-path="modulesList" 

value-path="value" label-path="label" />

</fd:multivaluefield>

....

I think  when the binding framework loads the bean he wants a Collection type for the modulesIDsList
field but when he save he wants a Object[] type field.



This probleme exist in the mail archive list but there is no solution in the thread.

(http://archives.real-time.com/pipermail/cocoon-users/2004-April/049643.html)

What do you think about that?

Noureddine 
Mime
View raw message