I am creating a custom menu and menuItem to be launched inside a custom widget.
here is my approach. I basically copied the code from Ext.menu.ColorMenu and modified the ColorItem inside. instead of filling in a ColorPalette, I inserted my own Panel. The panel would use autoLoad to fill itself with content from the server.
I have been able to get things going and popup the panel, but when loading content, I get a
this.el has no property. I can see why, since I don't have a applyTo: in the panel.
Ext.extend(Ext.ux.InsertPanel, Ext.Panel, {
applyTo: "?",
autoLoad: {url: "clientsearch.page", scripts: true},
Since the panel was invoked by MenuItem, I don't have control over what el's are available to attach to panel to. I saw an example which calls
var el = document.createElement("div"); inside onRender: , but I don't know how to match the autoloaded page onto this generated div, and whether onRender: is the property event handler in which to obtain the el. Michael Edenfield's Web log:: How to create a dynamic drop down menu in Wordpress using wp_list_pages define by the administrator in the wordpress administrative panel: <div menuitem[$i].'</h3> <ul class="menu2">'.$submenu.'</ul></div> <div id="info_'.$x. Overall count of used tags $threshold = 0; // How many tags are needed to get http://michaeledenfield.com/HOME |
please help out with this.
for a while, it show up a tiny, blank panel. now not at all.
here is the code if it helps.
Ext.ux.InsertMenu = function(config){
Ext.ux.InsertMenu.superclass.constructor.call(this , config);
this.plain = true;
var ci = new Ext.ux.InsertItem(config);
this.add(ci);
this.panel = ci.panel;
};
Ext.extend(Ext.ux.InsertMenu, Ext.menu.Menu);
Ext.ux.InsertItem = function(config){
Ext.ux.InsertItem.superclass.constructor.call(this , new Ext.ux.InsertPanel(config), config);
this.panel = this.component;
};
Ext.extend(Ext.ux.InsertItem, Ext.menu.Adapter);
Ext.ux.InsertPanel = function(config){
Ext.ux.InsertPanel.superclass.constructor.call(thi s, config);
};
Ext.extend(Ext.ux.InsertPanel, Ext.Panel, {
//applyTo: ????
autoLoad: {url: "clientsearch.page", scripts: true},
}
});
Normally, I could a div on my html page with an id, and in my panel, I declare applyTo: 'id'. In this case, the panel is launched by click on the menu item. I don't know where I have an handle to insert a div with the id.
Granted, I don't understand everything in this code, but for the moment, I am concentrating on getting the menuItem to display a meaning panel.
Thanks
How did the panel popup if it was not rendered? I think you need to show the whole code.
Get Smart About Monitoring Virtual Machines
Microsoft Gets Ex-Streamly Cozy with U.K.'s MediaWave
|