cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hepabolu <hepab...@gmail.com>
Subject Re: Bugs in ajaxified cform?
Date Thu, 24 Nov 2005 15:30:24 GMT
Jason Johnston wrote:
> hepabolu wrote:
> 
>> 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.
> 
> ...
> 
>> binding:
>>
>>  <fb:value id="exhibition" path="exhibition"/>
>>  <fb:union id="doexhibition" path=".">
>>   <fb:case id="TRUE" path=".">
>>    <fb:group id="TRUE" path=".">
>>     <fb:value id="exhibitionsize" path="exhibitionsize"/>
>>     <fb:value id="exhibitionwall" path="exhibitionwall"/>
>>     <fb:value id="exhibitionpartner" path="exhibitionpartner"/>
>>    </fb:group>
>>   </fb:case>
>>  </fb:union>
> 
> 
> 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.

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.

Bye, Helma


Mime
View raw message