-
20 Mar 2013 12:34 PM #1
Unanswered: initialize: function not showing in the log? No shows a list of nestedlist - no load
Unanswered: initialize: function not showing in the log? No shows a list of nestedlist - no load
Below is a sample code..and when you start the program there was no error, but the list is not loaded into nestedlist

Code:Ext.define('Sencha.view.Webaxis', { extend: 'Ext.tab.Panel', xtype: 'webaxis', id : 'q4webMain', requires : [ 'Ext.TitleBar', 'Ext.data.TreeStore', 'Ext.dataview.NestedList', 'Ext.data.Model', 'Sencha.model.MenuItem' // ], config: { title: 'YMS Axis 2', iconCls: 'home', layout: 'fit', items: [ { xtype: 'nestedlist', autoload: true, id : 'menuListConteiner', title : 'Show lists', displayField: 'text', store: { model: 'Sencha.model.MenuItem', defaultRootProperty: 'items', root: { text:'MENU', items:[ { id:'loading', text:'ŁADOWANIE', name:'loading', icon:'' } ] }, }, // no show log, why no loading data? no refresh? initialize: function() { ... here code example console.log('test ');// no show, why no loading data? }, getMenuCallback: function(json) { var obj = Ext.getCmp('menuListConteiner'); var store = Ext.create('Ext.data.TreeStore', { model: 'Sencha.model.MenuItem', defaultRootProperty: 'items', root: Ext.JSON.decode(json), }); obj.setStore(store); } } ] } });
Do you know how to solve the problem ?Last edited by rafcia007; 20 Mar 2013 at 12:40 PM. Reason: test
-
22 Mar 2013 6:52 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3109
initialize is not a config, it's a method on the nestedlist. If you want to do something within the initialize method, then you need to extend the nestedlist.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote