PDA

View Full Version : Can I use 3 different store in one class?



elnaz
19 Aug 2011, 12:07 AM
Hi ,

I have a tab panel with 3 tab ,and inside of each tab there is a grid list,
Can I use 3 different store in one class?
and also all of the model have belongs To my Atho Model ,should I write model name for each of this grid? or should I put something like this in above class
model: 'AM.model.Atho'







extend: 'Ext.tab.Panel',
alias:'widget.relationspanel',


width: 350,
border: true,
maxHeight:280,
bodyBorder: false,
fieldDefaults: {
labelWidth: 75,
msgTarget: 'side'
},


items: [{
title: 'Credential',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'StoreAutho',
selType: 'checkboxmodel',
multiSelect: true,
columns: [
{header:'Method',dataIndex:'method', flex: 1,align:'center'},
{header:' Information',dataIndex:'Info', flex: 1,align:'center'},

]
}]


},{
title: 'Public',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'Storetest',
selType: 'checkboxmodel',
multiSelect: true,
columns: [
{header:'test',dataIndex:'method', flex: 1,align:'center'},
{header:'test Information',dataIndex:'test', flex: 1,align:'center'},

]
}]
},{
title: 'Profile',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'StoreAuthotest',
selType: 'checkboxmodel',
multiSelect: true,
columns: [
{header:'Method',dataIndex:'method', flex: 1,align:'center'},
{header:'Autho Information',dataIndex:'autho', flex: 1,align:'center'},

]
}]
}
]








});

tobiu
19 Aug 2011, 12:47 AM
you can create 3 new instances of the store and put them into the store config. The current MVC implementation is not designed to handle it yet, but there are some extensions and overrides in the forums -> use the search :)


best regards
tobiu