Hi Carlos,

I use a multivalue field in one of my form with flowscript, where I read the values of the field in the valueChangedListener of another widget.
Here's a piece of my form definitions (articleReceiver is the multivalue field widget):

        <fd:field id="triggerUpdate" status="hidden">
          <fd:datatype base="string"/>
          <fd:on-value-changed>
            <fd:_javascript_>
            <![CDATA[
            print("publication.triggerUpdate: " + event.source.value);
            if (event.source.value != null) {
              var values = event.source.lookupWidget("../articleReceiver").getValue();
              print("Received " + values.length + " value(s)");
              for (var i = 0; i < values.length; i++) {
                print(i + ": " + values[i]);
              }
              event.source.value = null;
            }
            ]]>
            </fd:_javascript_>
          </fd:on-value-changed>       
        </fd:field>

Hope this helps.

Freek

On 26-jan-2006, at 17:57, Carlos Maté wrote:

Hi
In my javaflow I want to get values from  a multivaluefield.
This is de form definition:

<fd:multivaluefield

id="drinks">

<fd:datatype base="string" />

<fd:selection-list>
        <fd:item value="Maes"/>
        <fd:item value="Jupiler"/>
        <fd:item value="Leffe"/>
        <fd:item value="Hoegaarden"/>
        <fd:item value="Coca Cola"/>
      </fd:selection-list>
</fd:multivaluefield>

In my javaflow I write:

MultiValueField mvl = (MultiValueField) form.getChild(

"drinks");

Object[] list = (Object[]) mvl.getValue();

but list.length is 0.

How  can I obtain the values