View Full Version : Problem deleting and again creating child panel in CardLayout

Reema Seksaria
12 May 2011, 2:39 AM

I am developing an extjs based application which has search, add, and edit screens. User can navigate to Add and Edit screens from Search page. Add and Edit functionality is in the form of wizards having 5 steps each. I have used card layout and implemented it as follows:

Search, Add, and Edit page are cards of a container. Add and Edit again consists of 5 cards each.
I want to destroy the Add card when user comes back to the search page. However, I get the following error when user clicks the Add link on search page again to create the Add card:

c.getPositionEl().dom is undefined

I am using the following code to destroy it:
mainPanel.remove('addCard', true);

I am creating Add card by calling a function which creates a Panel and returns it.

Please suggest solution to it.