extjs4 - Panel inside my panel throwing an error - Cannot call method 'setSize' of undefined -
extjs4 - Panel inside my panel throwing an error - Cannot call method 'setSize' of undefined -
here panel open:
ext.define("ez.view.usefullinks.panel", { extend: "ext.panel.panel", alias: "widget.usefullinkspanel", layout: "border", border: 0, initcomponent: function() { this.sitepanel = ext.create("ez.view.usefullinks.sitepanel"); this.items = [ this.sitepanel ]; this.callparent(arguments); } });
and here panel causing error:
ext.define("ez.view.usefullinks.sitepanel", { extend: "ext.panel.panel", alias: "widget.usefullinkssitepanel", region: "center", layout: "fit", initcomponent: function() { this.items= [ '<iframe frameborder="0" src="http://www.google.com" width="100%" height="100%">' ] } });
is there wrong here?
i have follow initcomponent syntax. have border layout because more items in code aren't relevant error. thanks.
you cannot pass html straight items array. may seek instead:
ext.define("ez.view.usefullinks.sitepanel", { extend: "ext.panel.panel", alias: "widget.usefullinkssitepanel", region: "center", layout: "fit", listeners: { afterrender: function() { ext.core.domhelper.append(this.getel(), '<iframe frameborder="0" src="http://www.google.com" width="100%" height="100%"></iframe>'); } } });
or
ext.define("ez.view.usefullinks.sitepanel", { extend: "ext.panel.panel", alias: "widget.usefullinkssitepanel", region: "center", layout: "fit", html: '<iframe frameborder="0" src="http://www.google.com" width="100%" height="100%"></iframe>' });
extjs4
Comments
Post a Comment