cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: [cforms] creating selection list from vector
Date Tue, 05 Jul 2005 07:50:22 GMT
Il giorno 04/lug/05, alle 23:07, Thorsten Mauch ha scritto:

> I try to create a section list from a vector using the flow-jxpath
> implementation.
> I have a Vector objects with the getter for "oid" and "description". I  
> pass
> this vector
> the cforms (where getLineItems() retruns a Vector):
> form.showForm("",{"items": 
> formmodel.getLineItems()})
> ;
> I define the seclection list as follows:
>   <fd:selection-list>
>           <fd:selection-list type="flow-jxpath" list-path="items"
> value-path="oid" label-path="description" />
>       </fd:selection-list>
> What does i make wrong ?

Vector (besides being a "legacy" class) is not a Collection. You need  
to pass a Java2 collection to the template (i.e. a class implementing  
java.util.Collection) and not a Vector.

Apart from that, it's not advisable to use the flow-jxpath selection  
list. The recommended way is:

form.lookupWidget("field-id").setSelectionList(items, "oid",  

You also seem to have an fd:selection-list element inside another  
fd:selection-list element, which does not make sense.


Ugo Cei
Tech Blog:
Open Source Zone:
Wine & Food Blog:

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

View raw message