cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: question on UnionBinding
Date Thu, 01 Jul 2004 18:22:40 GMT
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

Mime
View raw message