cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: [cforms] selection list binding
Date Thu, 11 Mar 2004 08:26:23 GMT
Joerg Heinicke wrote:
> Ok, let me clarify. I think I do nothing unusual. Yes, I have a form 
> with a simple dynamic selection list. And I do the binding against a bean.

This is what I do all the time.

> There are two known ways to set the selection list dynamically: 
> setSelectionList(String uri) and setSelectionList(Object model, String 
> valuePath, String labelPath). The first one is for the @src, the latter 
> one for setting the selection list from flow (and using 
> FlowJXPathSelectionList internally).
> 
> As I do not want to go back to sitemap I chose the latter one, remains 
> only the question where to use it. 

var items = // some collection ...
form.showForm("uri", { "items" : items });

<wd:field>
...
   <wd:selection-list type="flow-jxpath" list-path="items"
     value-path="value" label-path="label"/>
...
</wd:field>

> I hope this time it was written more straight forward and not that much 
> irritating.

Don't worry, it's not you that are irritating, it's really me that's 
being obtuse ;-). And please excuse me if I still don't get what your 
aiming for.

	Ugo



Mime
View raw message