Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 98828 invoked from network); 1 Jul 2004 18:22:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Jul 2004 18:22:37 -0000 Received: (qmail 90578 invoked by uid 500); 1 Jul 2004 18:22:44 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 90535 invoked by uid 500); 1 Jul 2004 18:22:43 -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 90485 invoked by uid 99); 1 Jul 2004 18:22:42 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 01 Jul 2004 11:22:42 -0700 Received: (qmail 2837 invoked by uid 65534); 1 Jul 2004 18:22:21 -0000 Received: from a183069.studnetz.uni-leipzig.de (EHLO [139.18.183.69]) (139.18.183.69) by mail.gmx.net (mp017) with SMTP; 01 Jul 2004 20:22:21 +0200 X-Authenticated: #3483660 Message-ID: <40E45670.9070400@gmx.de> Date: Thu, 01 Jul 2004 20:22:40 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: question on UnionBinding References: <1088691361.16284.4.camel@localhost.localdomain> <40E44987.8060504@gmx.de> <20040701184454.GP29256@keow.org> In-Reply-To: <20040701184454.GP29256@keow.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On 01.07.2004 20:44, Tim Larson wrote: >>But it has another drawback: The model binding is now also load only >>conditionally. What I need is to load the whole model but to save only >>the one selected. For this I had to add this binding twice: once with >>direction="load" as direct child of union binding and once with >>direction="save" as child of case binding. > > > That seems is kinda strange, but probably only because your use case > is different than mine. Could you explain why you need to bind the > non-selected cases so I can understand your use case better? To put > it another way, what makes your use case need an asymetrical binding? > > For example, if you look at the (admittedly needing to be worked on) > Form Model GUI's binding, you will see code that figures out and sets > the union's case based on the actual data that is being bound, and > then that is used by the union and cases to make sure that only the > relevant bindings for the current case get invoked and that the other > bindings do not get invoked. Use case: user will trigger an event, he can choose the event, the events are parameterized differently. The choose is the select box/caseWidget. The sample booleanfield is needed for a few of the cases, for other cases other fields are needed and some of them - now the reason for the asymmetry - have default values. As the switch from one case to another one is caused by submit-on-change on the select box now binding will be caused. Does this make sense? Joerg