0

I have the following Case:

TreePanel (width: 400, Height: 300) with a button in the TopBar. When user click on this Button , we open a new Window (width: 800, Height: 600) containing the same TreePanel.

My Question is:

Is it possible to copy the TreePanel into the new Window or at least using the TreePanel's store as a store for the new TreePanel? Or I am obliged to create a new TreePanel with a new Store?

Thanks,

I3i0
  • 1,191
  • 2
  • 12
  • 25

1 Answers1

1

Yes, you can use the same store in both TreePanels. Give the store a storeId, and then user the Ext.data.StoreManager to get the store based on the storeId.

For more information: http://docs-origin.sencha.com/extjs/4.2.0/#!/api/Ext.data.StoreManager

As for using the same TreePanel, you can't use the exact same instance, but you can create a class that extends TreePanel, and then just instantiate your custom TreePanel in both the places you want it.

forgivenson
  • 4,394
  • 2
  • 19
  • 28
  • Yes Ext.data.StoreManager works in ExtJS , thanks forgivenson, and in Ext.Net i just noticed "thank to you" that there is a StoreID property which do what i want. – I3i0 May 14 '14 at 16:04