cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uchenna Igwebuike" <>
Subject Resend -- RE: Help with <fb:multi-value/> binding - CFORMS
Date Tue, 13 Apr 2004 15:20:18 GMT
Could someone let me know if the <fb:multi-value/> widget can be bound
in both directions to a bean and how to do it. 

Thanks in advance. 

-----Original Message-----
From: Uchenna Igwebuike [] 
Sent: Monday, April 12, 2004 7:15 AM
To: ''
Subject: RE: Help with <fb:multi-value/> binding - CFORMS

When I bind a form without selecting any data to the bean, I don't get
any errors, but when it contains some selections I get the following

uncaught JavaScript exception: at material
entory.js, Line 64) at
(resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 164):
org.apache.commons.jxpath.JXPathException: Exception trying to create
xpath measureCollection; Factory is not set on the JXPathContext -
cannot create path: /facility[1]

The stack trace shows that the exception is thrown in the binding
implementation  org.apache.cocoon.forms.binding.MultiValueJXPathBinding,
within doSave(Widget frmModel, JXPathContext jctx) throws
BindingException method.

Below is that block of code, is this not implemented completely  ?? or
is my configuration not correct??? (Note the sample in the distribution
only binds the data to the bean during the loading)

if (values != null) {
            // first update the values
            for (int i = 0; i < values.length; i++) {
                String path = this.rowPath + '[' + (i+1) + ']';
     >>>>>           Pointer rowPtr =

                Object value = values[i];
                if (value != null && convertor != null) {
                    value = convertor.convertToString(value,
convertorLocale, null);


Below is my set up 

-----------Form Model -----------
        <fd:multivaluefield id="facility" required="false">
            <fd:datatype base="string"/>
            <fd:selection-list type="flow-jxpath" list-path="facility"
                label-path="concat(name,' - ',description)"/>

--------  Binding ------------------------

<fb:multi-value  id="materialMeasure" parent-path="."

-- Form template  - ---------
<ft:widget id="facility">
<fi:styling list-type="double-listbox" listbox-size="5">

--  Java Bean ----------
private Collection facility = new ArrayList();

   public Collection getFacility() {
        return facility;

    public void setFacility(Collection facility) {
        this.facility = facility;

-----Original Message-----
From: Marc Portier [] 
Sent: Monday, April 12, 2004 12:47 AM
Subject: Re: Help with <fb:multi-value/> binding - CFORMS

Uchenna Igwebuike wrote:

> Does anyone have an example on how to bind data from and to a bean
> an ArrayList field to store multivalue data from a form

not yet (that I know of)

what have you tried? and what doesn't work?

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                          

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

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

View raw message