extjs - Controller doesn't seem to be running -
nothing in controller seems working. so, have checked the network tab of google chrome web developpement , have noticed controller file isn't running. have ctrl find name of controller , can't find it. here's print sceen of it.
here main app file
app.js
ext.application({ name: 'uniselect', requires: ['ext.messagebox',], controller: ['controleur'], views: ['main','listeclient'], model: ['listeclient'], store: ['listeclient'], icon: { '57': 'resources/icons/icon.png', '72': 'resources/icons/icon~ipad.png', '114': 'resources/icons/icon@2x.png', '144': 'resources/icons/icon~ipad@2x.png' }, isiconprecomposed: true, startupimage: { '320x460': 'resources/startup/320x460.jpg', '640x920': 'resources/startup/640x920.png', '768x1004': 'resources/startup/768x1004.png', '748x1024': 'resources/startup/748x1024.png', '1536x2008': 'resources/startup/1536x2008.png', '1496x2048': 'resources/startup/1496x2048.png' }, launch: function() { // destroy #apploadingindicator element ext.fly('apploadingindicator').destroy(); // initialize main view ext.viewport.add(ext.create('uniselect.view.main')); }, onupdated: function() { ext.msg.confirm( "application update", "this application has been updated latest version. reload now?", function(buttonid) { if (buttonid === 'yes') { window.location.reload(); } } ); } });
the console doesn't print "runs" string @ beginning of controller file.
controleur.js
console.log('runs'); ext.define('uniselect.controller.controleur', { extend: 'ext.app.controller', requires: ['ext.messagebox'], config: { refs: { liste: '#listeclient', liste: { selector: '#listeclient', xtype: 'listeclient', autocreate: true, forcecreate: true } }, control: { liste: { itemtap: 'selectionclient' }, } }, selectionclient: function() { console.log('itemtap-runs'); }, launch: function() { this.selectionclient(); console.log('heyeye'); } });
i think problem config array in application definition should controllers
not controller
.
Comments
Post a Comment