Results 1 to 2 of 2

Thread: [2.1] radiofield group not able to assign/get value if ui='checkbox'

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3850 in a recent build.
  1. #1
    Sencha Premium User
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    733
    Vote Rating
    46
      0  

    Default [2.1] radiofield group not able to assign/get value if ui='checkbox'

    rem the ui config or change 'checkbox' to 'radio' and it will work.

    Code:
                var form = Ext.create('Ext.form.Panel', {
                    fullscreen: true,
                    items: [{
                        xtype: 'toolbar',
                        docked: 'top',
                        items: [{
                            text: 'set checked (senchatouch)',
                            handler: function (btn, evt) {
                                var value = 'senchatouch',
                                        radio = btn.up('formpanel').down('radiofield[name=product]');
                                if (!radio.setGroupValue(value)) {
                                    Ext.Msg.alert(value + ' was not found');
                                } // if
                            } // handler
                        }] // items (toolbar)
                    }, {
                        xtype: 'fieldset',
                        defaults: {
                            xtype: 'radiofield',
                            labelWidth: 180,
                            name: 'product',
                            ui: 'checkbox'
                        }, // defaults
                        items: [{
                            label: 'Ext JS',
                            value: 'extjs'
                        }, {
                            label: 'Sencha Touch',
                            value: 'senchatouch'
                        }, {
                            label: 'Sencha Designer',
                            value: 'designer'
                        }] // items (fieldset)
                    }] // items (panel)
                }); // create()
    The sample is from http://senchaexamples.com/2012/03/15...encha-touch-2/

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Vote Rating
    1367
      0  

    Default

    looks like the getSameGroupFields is trying to match elements with '.x-field-radio' cls but the fields have '.x-field-checkbox' so the element is not found resulting in the components not found.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •