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: Bugs in ajaxified cform?
Date Thu, 24 Nov 2005 16:21:09 GMT
hepabolu <hepabolu <at> gmail.com> writes:

> >> 1. binding in union
> >>
> >> I have a union with two cases, one with a dummy field (i.e. not used), 
> >> one with 3 fields (an integer, a boolean and a string). I fill a 
> >> JS-bean  with preset values for those three fields.
> >> The form starts with the first case as default (set in the JS-bean, 
> >> works). When I switch to the other case, the preset values don't show up.
> > 
> > This seems to be behaving correctly.  <fb:case/> only performs its child 
> > bindings if its id matches the value of the union's case widget.  Since 
> > you just set the case widget's value to "FALSE" via the first fb:value 
> > binding, the <fb:case id="TRUE"> will not be executed.
> > 
> > If you want that group of bindings to always be executed you should be 
> > able to just remove the fb:case wrapper.
> 
> Hmm, I was under the impression that the TRUE-binding would be done when 
> I switch the exhibition value from FALSE to TRUE. And that doesn't happen.

No, the binding is not executed "on switch", only when explicitely calling
load() or save() in your flowscript.

> I've seen samples where both cases use the same fields but with 
> different data types (and could be initialized differently). If the 
> above is correct behaviour, it would be impossible to set the fields to 
> the data types of the "other" (i.e. non-default) binding.

IIRC I ended with two bindings when using union: one for loading all the values,
one for saving the values appropriate to the selected case. But I might be
wrong, it was already one year ago, and I have no access to this code at the
moment.

Jörg


Mime
View raw message