Window in extjs problem in reopening ( a unique and basic problem of extjs )
I had a problem ,widow ones closed is not opening due to items
extjs desktop system i created shortcut on the destop and when i click on the link first time window opens is working and if i close the subwindow and click on the same link again not opening not working/*****this is the code till now *******/
Ext.Window{
/**** here is my stuff ******/
items:[ a1 ]
}
var a1 = new Ext.FormPanel({ //*** other stuff ****//
items:[ new combobox({id:'com'})]
});
/*****End of code till now *******/
if i change to
Ext.Window{
/***** here is my 开发者_运维百科stuff ******/
items:[ new a1() ]
}
var a1 = Ext.extend( Ext.FormPanel ,{
/****some stuff ****/
items:[ new combo_box({id:'com'})]
} );
the combo_box does not work can somebody help me a little on this stuff
You need to destroy window items, before you destroy the window itself.
Altenratively, don't use global id;s for components that will be recreated several times. Consider using Ext.id() function to generate unique ids with given prefix.
items:[ new combobox({id:Ext.id()})]
If the form/combo isn't being modified each time you open the window, just add closeAction: 'hide' to your Window configuration. Then, the window will not be destroyed when you close it and you can call Window.show() to make it appear again.
精彩评论