Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext JS Premium Member jason.hutton's Avatar
    Join Date
    Nov 2010
    Location
    Birmingham, AL
    Posts
    7
    Vote Rating
    0
    jason.hutton is on a distinguished road

      0  

    Default Use a store to create a RadioGroup

    Use a store to create a RadioGroup


    Does any one have an example of taking JSON and creating a RadioGroup?

    Thanks in advance
    Jason Hutton
    Jason Hutton

    I see your schwartz is as big as mine!

  2. #2
    Ext JS Premium Member jason.hutton's Avatar
    Join Date
    Nov 2010
    Location
    Birmingham, AL
    Posts
    7
    Vote Rating
    0
    jason.hutton is on a distinguished road

      0  

    Default


    Got this to work.

    The Direct Store:
    Code:
    Application.Data.RoleStore = new Ext.data.DirectStore({
        paramsAsHash: false,
        root: 'ROWS',
        totalProperty:'DATASET',
        autoLoad:true,
        directFn: Application.Data.ss['icefyre.com.objects.RoleService'].getAllRoles,
        fields: [
            {name:'Role_ID',type:'int'},
            {name:'Role',type:'string'}
        ],
        listeners: {
            load:{
                fn: function(st,recs,opts)
                {        
                    var rGroup = Ext.getCmp('RoleFieldGroup');
                    rGroup.items.length = 0;
                    Ext.each(recs, function(item)
                    {
                        checked = false;
                        if(item.data.Role_ID === 3)
                            checked = true
                        rGroup.items.push({
                            xtype: 'radio',
                            boxLabel: item.data.Role,
                            inputValue: item.data.Role_ID,
                            name: 'RoleField',
                            checked: checked
                        });
                    });
                    rGroup.doLayout();
                }
            },
            loadexception: {
                fn: function() 
                {
                }
            }
        
        }
    })
    The RadioGroup in my FormPanel:
    Code:
    {
        xtype: 'radiogroup',
        fieldLabel: 'Role',
        id:'RoleFieldGroup',
        columns: 1,
        items: [
            {boxLabel: 'Standard User', name: 'RoleField', inputValue:'1', checked: true}
        ]
    }
    Hope that helps someone else. If there is a way to do it better let me know.

    Thanks
    Jason Hutton

    I see your schwartz is as big as mine!

Similar Threads

  1. rowEditor/store issues create event on new record create
    By surfyogi@gmail.com in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 13 Jan 2010, 9:22 AM
  2. Replies: 2
    Last Post: 29 Jul 2009, 9:12 AM
  3. radiogroup and store proxy http
    By italoc in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 17 Jul 2009, 12:43 AM
  4. How to create a sub data.store from an existing store
    By gywinston in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 Oct 2008, 4:26 PM

Tags for this Thread