Hey,
> I have a set of qx.ui.menu.RadioButton objects. Which one of them is 
> selected I want to be dependent on a given property. So I use 
> databinding ala:
> 
> var stateCheck = function(desired) {
>       return {converter: function(state) {return state == desired}}};
> controller.addTarget(button1, 'value', 'state', false, stateCheck(0));
> controller.addTarget(button2, 'value', 'state', false, stateCheck(1));
> 
> The problem with this is that the RadioButton takes it upon itself to 
> change it's own value upon being clicked. If I want to control this 
> behaviour, for example ask the user to confirm the state change. The 
> problem really extends beyond databinding.
> 
> I currently use the following workaround:
> 
> function DataBoundRadioButton(label) {
>   var button = new qx.ui.menu.RadioButton(label);
>   // Do not manually change the checked state.
>   button.removeListener('execute', button._onExecute, button);
>   return button;
> }
> 
> 
> I think the way I have seen this done in other UI frameworks is that 
> each menu item has the ability to be checked or unchecked, and that a 
> RadioButton class would then implement the toggling logic - which would 
> allow people who want manual control to just use the regular buttons.

I'm sorry but I don't get the root of your problem. Could you be a bit more 
precise what's your plan and why the current radio button implementation does 
not fit your needs?

Regards,
Martin


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to