Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 10336 invoked from network); 10 Mar 2004 23:33:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 10 Mar 2004 23:33:53 -0000 Received: (qmail 29206 invoked by uid 500); 10 Mar 2004 23:33:28 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 29099 invoked by uid 500); 10 Mar 2004 23:33:27 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 28896 invoked from network); 10 Mar 2004 23:33:24 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 10 Mar 2004 23:33:24 -0000 Received: (qmail 1674 invoked by uid 65534); 10 Mar 2004 23:33:30 -0000 Received: from a183069.studnetz.uni-leipzig.de (EHLO gmx.de) (139.18.183.69) by mail.gmx.net (mp027) with SMTP; 11 Mar 2004 00:33:30 +0100 X-Authenticated: #3483660 Message-ID: <404FA5DA.2050008@gmx.de> Date: Thu, 11 Mar 2004 00:33:46 +0100 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [cforms] selection list binding References: <404F3C39.3080507@cbim.it> <404F823F.2040501@cbim.it> In-Reply-To: <404F823F.2040501@cbim.it> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 element. 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 irritating. Thanks in advance for any comment. Joerg