pansiom
18 Feb 2012, 2:28 AM
item = Ext.create('Ext.ButtonGroup',records[i].get('text'));
args.json:
{
'success': true,
'totalProperty':'3',
'results': [{'id': '1','text':[{
columns: 3,
title: 'AA',
items: [{
text: 'A1',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
//cls: 'x-btn-as-arrow'
},{
text: 'A2',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
},{
text: 'A3',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
}]
}]},{'id': '1','text':[{ columns: 3,
title: 'BB',
items: [{
text: 'B1',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
//cls: 'x-btn-as-arrow'
},{
text: 'B2',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
},{
text: 'B3',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
}]
}]}]
}
Ext.define('args', {
extend: 'Ext.data.Model',
fields: ['id', {name:'text', type: 'buttongroup'}]
});
Ext.create('Ext.data.Store', {
model: 'ImageModel',
proxy: {
type: 'ajax',
url: 'args.json',
reader: {
type: 'json',
root: 'results'
}
},
scope: this
}
});
args.json:
{
'success': true,
'totalProperty':'3',
'results': [{'id': '1','text':[{
columns: 3,
title: 'AA',
items: [{
text: 'A1',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
//cls: 'x-btn-as-arrow'
},{
text: 'A2',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
},{
text: 'A3',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
}]
}]},{'id': '1','text':[{ columns: 3,
title: 'BB',
items: [{
text: 'B1',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
//cls: 'x-btn-as-arrow'
},{
text: 'B2',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
},{
text: 'B3',
scale: 'large',
rowspan: 3,
iconCls: 'add',
iconAlign: 'top'
}]
}]}]
}
Ext.define('args', {
extend: 'Ext.data.Model',
fields: ['id', {name:'text', type: 'buttongroup'}]
});
Ext.create('Ext.data.Store', {
model: 'ImageModel',
proxy: {
type: 'ajax',
url: 'args.json',
reader: {
type: 'json',
root: 'results'
}
},
scope: this
}
});