view:
Store:
Model:
when i run this in chorme like this
_@~BD$Y(BDDPTKF2](4S.jpg
then i click one list ,it tips “No items availavle”
like this:3E(MW9YS}T5ST21@N1LCS.jpg
can anyone help me ? I don't kown why this happend and how to resolve it
Code:
Ext.define('GS.view.BizTypeMenuView', {
extend: 'Ext.NestedList',
xtype: 'biztypemenuview',
requires:['Ext.data.TreeStore'],
config: {
title: 'business',
iconCls: 'home',
displayField: 'text',
store: {xclass:'GS.store.BizTypeStore'}
}
});
Store:
Code:
Ext.define('GS.store.BizTypeStore', {
extend: 'Ext.data.TreeStore',
config: {
model: 'GS.model.BizTypeModel',
defaultRootProperty: 'items',
root: {
items: [
{
text: 'Drinks',
items: [
{
text: 'Water',
items: [
{ text: 'Still', leaf: true },
{ text: 'Sparkling', leaf: true }
]
},
{ text: 'Soda', leaf: true }
]
},
{
text: 'Snacks',
items: [
{ text: 'Nuts', leaf: true },
{ text: 'Pretzels', leaf: true },
{ text: 'Wasabi Peas', leaf: true }
]
}
]
}
}
});
Model:
Code:
Ext.define('GS.model.BizTypeModel', {
extend: 'Ext.data.Model',
config: {
fields: [
{name: 'text', type: 'string'}
]
}
});
when i run this in chorme like this
_@~BD$Y(BDDPTKF2](4S.jpg
then i click one list ,it tips “No items availavle”
like this:3E(MW9YS}T5ST21@N1LCS.jpg
can anyone help me ? I don't kown why this happend and how to resolve it
Aucun commentaire:
Enregistrer un commentaire