cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Maddy <>
Subject binding framework and multivaluefields
Date Tue, 28 Mar 2006 17:36:12 GMT
Does anyone know how to use the binding framework to set a 
multivaluefield?  My XML file has a string that is comma separated 
values that I need to load in, but I can't even get a simple array to 
work.  Here's what I have so far:

Form Definition:
        <fd:multivaluefield id="unit_type">
            <fd:datatype base="long">
            <fd:label>Unit Type(s):</fd:label>
                <fd:item value="1">
                    <fd:label>value 1</fd:label>
                <fd:item value="2">
                    <fd:label>value 2</fd:label>
                <fd:item value="3">
                    <fd:label>value 3</fd:label>

Form Binding:
    <fb:javascript id="unit_type" path="dev:bldg_amenities" 
var values = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 0);
//values[0] = 1;
//values[1] = 2;
//values[2] = 3;

If I set the values variable to null, the form displays correctly, so 
everything else seems to be working.

Anyone know how to do this?


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

View raw message