extjs复选框数据呈现问题

时间:2013-03-10 23:05:39

标签: extjs checkbox

php从服务器端返回数据但不是extjs不呈现字段的值

我正在使用xtype:'复选框'

{ “总”:1, “成功”:真, “锁定”:[{ “ID”: “1”, “RECORD_ID”: “11”, “is_unreachable”: “1”, “is_directory_Lock”: “1”, “is_Internet_Lock”: “0”, “is_partner_Lock”: “1”, “is_home_business”: “1”, “is_top_listing”: “1”, “is_mole”: “1”, “is_pre_call”:“1 ”, “is_new_business”: “1”, “is_free_adv”: “1”, “is_verified”: “1”, “is_reviewed”: “1”, “is_idr”: “1”}]}

json数组从服务器返回

2 个答案:

答案 0 :(得分:0)

你必须粘贴代码。

但为什么不去举例: http://docs.sencha.com/ext-js/4-0/#!/example/grid/array-grid.html

答案 1 :(得分:0)

Ext.define( 'UserApp.view.uiTypes.LockFeature',{     extend:'Ext.form.Panel',     可折叠的:是的,     flex:1,     身高:200,     宽度:600,     store:null,     itemId:'lockfeature',     布局:{         类型:'table',         专栏:3     },

items:[{

        xtype: 'checkbox',
        boxLabel: 'Is Unreachable',
        name: 'is_unreachable',
        id: 'is_unreachable',
        dataIndex: 'is_unreachable',
        inputValue: 'true', 
        uncheckedValue: 'false',
        value: true, 


},{

    xtype: 'textfield',
    name: 'is_unreachable_update',
    fieldLabel: 'Last Update',

},{
    xtype: 'textfield',
    name: 'update_by_user',
    fieldLabel: 'By'
}],


initComponent: function(){
    console.log(this.table);
    console.log(this.record_id);
    var table = this.table;
    var parentTable = table.split('_');
    console.log(parentTable[0]);
    var store = Ext.create('UserApp.store.LockFeature');
    store.getProxy().setExtraParam('table',parentTable[1]);
    store.getProxy().setExtraParam('tab',parentTable[1]);
    store.getProxy().setExtraParam('saving_table', table);
    store.getProxy().setExtraParam('record_id',this.record_id);
    this.store = store;
    this.callParent(arguments);
    store.load();

}

});