-
4 May 2012 12:53 PM #1
[4.1.0] Treepanel LoadMask: cannot call method 'hasCls' of null
[4.1.0] Treepanel LoadMask: cannot call method 'hasCls' of null
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.0 GA
- Chrome 18
- Strict
- Loading a tree will fail with an uncaught exception when a loadmask is defined for a treepanel.
- This currently relies upon an override to enable loadMask support for tree panels. See forum post.
- Run the code.
- No error and a loadMask should appear when the tree is refreshed.
- The process dies.
Code://BUG: http://www.sencha.com/forum/showthread.php?198341-4.1-Loading-mask Ext.define('Ext.view.AbstractViewOverride',{ override: 'Ext.view.AbstractView', onRender: function() { var me = this; me.callOverridden(arguments); if (me.loadMask && Ext.isObject(me.panel.store)) { me.setMaskBind(me.panel.store); } } }); var store = Ext.create('Ext.data.TreeStore', { proxy: { type: 'ajax', url: '/includes/library/extjs/ext/examples/tree/get-nodes.php' }, root: { text: 'Ext JS', id: 'src', expanded: true }, folderSort: true, sorters: [{ property: 'text', direction: 'ASC' }] }); var tree = Ext.create('Ext.tree.Panel', { loadMask: true, store: store, renderTo: Ext.getBody(), height: 300, width: 250, title: 'Files', useArrows: true, dockedItems: [{ xtype: 'toolbar', items: [{ text: 'Refresh', handler: function(){ store.load(); } }] }] });
HELPFUL INFORMATION
Additional CSS used:- only default ext-all.css
- WinXP Pro
- In Ext.view.AbstractView#onMaskBeforeShow, the "all" collection is cleared before displaying the mask.
- The value of the "loading" field changes when the response is received, which triggers a call to Ext.view.Table#onUpdate.
- The "all" collection is used in Ext.view.Table#onUpdate to look up the oldRow reference but will return null because the collection was cleared when the mask was shown.
-
7 May 2012 12:40 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
Thanks for the report.
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.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-6136
in
4.1.


Reply With Quote