tags:

views:

54

answers:

3

Hi all , 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

A: 

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()})]
Mchl
hi there i really need custom 'id' as i had lots of lots of item used at different places
Extjs Commander
There are other ways of managing many components. You can actually write an ExtJS application without ever seeting an explicit id.For start check the `itemId` property and `Ext.Container.getComponent()` function.
Mchl
problem is i already did a lot of programming by ID also combo_box is my custom combo_box
Extjs Commander
A: 

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.

Jason
A: 

Are you getting any error in the second time? Did you check that in Firebug? Can you provide some more code of your example?

Swar