cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: [cforms] selection list binding
Date Wed, 10 Mar 2004 23:33:46 GMT
On 10.03.2004 22:01, Ugo Cei wrote:

> Not it's me that's not getting your point here ;-).

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.

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. I found wd:on-value-changed in the 
samples, the usage in the "normal" flowscript works of course too. 
on-value-changed is not appropriate for me. The usage of 
setSelectionList in the "normal" script makes it specific to the form, 
at the moment it is so generic that it is applicable for all my forms.

So when/where shall the selection list be set? I liked the idea of doing 
it during the binding, wb:javascript made it possible to me. Do you 
think it's bad? I added therefore the collection to fill the selection 
list to my DTO.

For the case this is not a completely stupid way of handling it I 
suggested to replace the wb:javascript code with a common usable wb:list 

But still I have one problem independent of this: When using 
setSelectionList() the entry without a value, that should be there to 
unset any choice, is replaced/removed.

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

Thanks in advance for any comment.


View raw message