-
5 May 2012 1:08 AM #1
Error loading new content to panel
Error loading new content to panel
I have a panel that load some html content, here's the code:
the autoLoad is working, and then I try to load the panel with newly updated html.Code:Ext.define('PMK.view.panel.Personalization' ,{ extend: 'Ext.panel.Panel', alias : 'widget.userpersonalization', autoScroll: true, border: false, initComponent: function() { this.autoLoad = ({ url:'page/htmlbio.php', text: 'Loading User Biodata...' }); this.callParent(arguments); } });
the Ext.ComponentQuery.query('userpersonalization') successfully return the component but I got this errorCode:Ext.ComponentQuery.query('userpersonalization').load({ url: 'page/htmlbio.php', scripts: true });
Ext.ComponentQuery.query("userpersonalization").load is not a function
so, can someone explain how to load new content to panel?
-
5 May 2012 1:56 AM #2
query() returns an array, you need the object reference.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
5 May 2012 2:16 AM #3
thx for the reply, after I add an id config to panel then I use this to reference the object.. it's working

Code:Ext.getCmp('mypanel').getLoader().load({ url: 'page/htmlbio.php', scripts: true });
-
5 May 2012 2:17 AM #4
So you are working with ComponentLoader, then should work panel.getLoader().load()
My blog: http://vadimpopa.com
-
5 May 2012 2:19 AM #5
:16, :17 almost
My blog: http://vadimpopa.com


Reply With Quote