PDA

View Full Version : How to show the child window and its components after closing?



vertex
5 May 2011, 9:59 PM
hi,i am using ext js to create a desktop user interface application, In that i am using menu items like grids, forms and windows,
here my problem is,in some windows having more buttons(like menu), each and every buttons want to open a new window ,so i decided to
create a handler-function its work well but when i closed the child window, after open it wont show simply window alone showing(the form elements are all disabled )
im using the following format code for using each and every window...finally i ask how to show the child window compoents using functions?

my code is:

MyDesktop.GridWindow = Ext.extend(Ext.app.Module, {
id:'grid-win',
init : function(){
this.launcher = {
text: 'DASHBOARD', // table menu item
iconCls:'icon-grid',
handler : this.createWindow,//call a function
scope: this
}
},

createWindow : function(){ //handler function starts here
var desktop = this.app.getDesktop();
var win = desktop.getWindow('grid-win');
if(!win){
win = desktop.createWindow({
id: 'grid-win',
title:'Dashboard Grid',
width:850,
height:370,
iconCls: 'icon-grid',
shim:false,
animCollapse:false,
constrainHeader:true,

layout: 'fit',
items: [{xtype:'users_form',id:'adduserFrom'}], //namespace form to use here
buttons:{{text:'close',handler:function(){win.close();}}]
buttons: [{
text: 'close',
handler: function(){win.hide();}

}],

viewConfig: {
forceFit:true
},

});
}
win.show(); //showing configured window
}
});

9 May 2011, 5:04 AM
Might help if you post in the proper places. Moved to Ext JS help