Martin,

Thanks for the feedback.  RadioGroup also sends an array of the selected models 
where RadioButtonGroup sends an array of the selected RadioButtons?  If my 
property is looking for a single, non-Array value I will have to do some 
conversion regardless.  It would seem that the idea of responding with an array 
of models supports the easy switch/replacement of the View part of the form 
with a multiple select checkbox if so needed.  But, it still seems strange for 
an object which specifies that only one item can be selected to send an array 
of data (holding only one item) upon selection.  It's easy enough to convert so 
that's actually not my real question, but thank you for the direction to the 
RadioGroup.

My main question was in regards to the different event behavior when the form 
upon when the RadioButtonGroup resides is disabled.  When the parent form is 
disabled my converter function is receiving an empty array when I am 
programmatically updating the RadioButtonGroup.  Is that by design?

Kudos to the qooxdoo team.  It is an amazing piece of code and it has been a 
life saver in terms of allowing me to quickly craft Web-based GUIs that look 
very professional.  Thank you for sharing all the hard work.

Andy

On May 10, 2010, at 5:02 AM, <[email protected]> 
<[email protected]> wrote:

> Hey Andy,
> the RadioGroup also supports the "modelSelection" property which is exactly
> what you need. That saves you the whole converter. ;)
> Regards,
> Martin

>> I am using a RadioButtonGroup with several buttons.  For each RadioButton I 
>> add to the RadioButtonGroup I set the model to contain the data I want 
>> passed to property of an object to when I bind it to the RadioButtonGroup's 
>> "changeSelection" event.  I use a converter function for the binding like so:
>> 
>> var options = {
>>      converter : function(data) {
>>         return data[0].getModel();
>>      }
>> };
>> 
>> radioGroup.bind("changeSelection", targetWidget, targetWidgetsProperty, 
>> options);
>> 
>> With the converter I'm making the assumption that there will always be one 
>> RadioButton item in the array.  This works until I disable the composite 
>> widget on which it resides.  I sometimes need to disable the widget to block 
>> out user interaction as I update data on the form.  I find that when I do 
>> disable it, the value received by the converter is an empty array.
>> 
>> Is this by design?  I couldn't quite follow what was happening at a low 
>> level within the qooxdoo libraries in the setModelSelection routines for 
>> RadioButtonGroup and RadioGroup to see where it was failing.

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to