Results 1 to 2 of 2

Thread: Sharing Store acorss views

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    221
    Answers
    10
    Vote Rating
    2
      0  

    Question Sharing Store acorss views

    HI All,

    I have a view which shows a grid and a button. On click on button I open a pop-up window (another view). Here I perform some manipulation (through UI) and create a store. On close of this window (pop-up window), I want to pass this store to the main view. How can I acheive this.

    Thanks in advance

  2. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64
    Vote Rating
    33
      0  

    Default

    you can pass it as an object property :
    Code:
            var mywindow = Ext.create('Ext.window.Window', {
                title : 'Main Window',
                width : 600,
                height : 400,
                buttons : [{
                    text : 'Open popup',
                    handler : function() {
                        Ext.create('Ext.window.Window', {
                            title : 'Popup Window',
                            width : 300,
                            height : 200,
                            modal : true,
                            buttons : [{                       
                                text : 'Close Window',
                                handler : function() {
                                    var store = "something";
                                    mywindow.passStore = store;
                                    this.up('window').close();
                                }
                            }]
                        }).show();
                    }
                },{
                    text : 'Store from popup',
                    handler : function() {
                        alert(mywindow.passStore);
                    }
                }]
            }).show();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •