Vote count:
0
Currently I'm a newbie in Sencha and I want to update the badgeText in Sencha Touch from the store count in Ext.Container, Please see my code below for your reference Thank you and God bless.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ext.define('XX.view.Menu',{
extend: 'Ext.Container',
xtype: 'menu',
config: {
cls: 'mainmenu',
docked: 'left',
top: 0,
left: 0,
bottom: 0,
zIndex: 0,
width: 266,
padding: '0 0 0 0',
open: false,
scrollable: 'vertical',
defaultType: 'button',
defaults: {
textAlign: 'left'
},
scrollable: {
indicators: false
},
items: [{
text: 'Home',
ui: 'mainmenu',
iconCls: 'home',
itemId: 'home'
},{
text: 'Contact Us',
ui: 'mainmenu',
iconCls: 'form',
itemId: 'contactus'
},{
text : 'Notifications',
ui: 'mainmenu',
badgeText: '0',
iconCls: 'form',
itemId: 'notifications'
}]
},
setParent: function(parent) {
this.callParent(arguments);
this.maskCmp = parent.add({
xtype : 'component',
cls : 'mainmenu-mask',
top : 0,
zIndex : 5000,
hidden : true,
width : 9999,
left : this.getWidth(),
bottom : 0
});
this.maskCmp.element.on({
scope : this,
touchend: 'onMaskRelease'
});
}
});
asked 25 secs ago
How to update badgeText in Sencha Touch (Ext.Container)
Aucun commentaire:
Enregistrer un commentaire