0
votes

enter image description here

Hi,

I'm implementing a layout with Extjs 4 as shown in the image.

The layout contains

  1. 4 tab panels

  2. Each tab content will be loaded dynamically. The loaded page contains left navigation panel and right side container to load the respective page

  3. The page which is loaded in right side container will have a button

  4. When the button is clicked a pop will be shown

I'm showing one pop up in page1 and another different pop up in page2.

What my problem is

when i click the button on the 1st page its showing a popup (say pop up 1), for the second page when i click on the button it has to show pop up2, which contains some panels.

But pop up 1 appears in the second page.

the same pop up appears in all the sub pages.

if i reload the entire page and directly go to the page2 it shows the pop2.

i think that the window once created will persist until the page is reloaded.

i'm using window as follows

var createLessonWin = Ext.widget('window', {
    autoHeight:true,
    id: 'cformWin',
    closeAction: 'hide',
    y: 100,
    modal: true,
    plain: true,
    layout: 'fit',
    items: profile_form

});



Ext.get('add_lessons_btn').on('click', function () {
        createLessonWin.show();

    });

if i use closeAction: 'destroy' window elements also destroyed.

i tried with Ext.create('Ext.window.Window', {}) and new Ext.Window also. the same problem appears.

Content of the pop up in each page is a different form

How to solve this problem

1

1 Answers

1
votes

I'm assuming you only use that code for one of the two windows. The items property is what goes in the window, so you'll need that to be different for the two buttons. Secondly, make sure your ids are unique for each window.

If you post some more code, I might have a better idea of what's going on. How do you create your other window?