Results 1 to 2 of 2

Thread: Passing arguments to window's Show event

  1. #1
    Sencha User
    Join Date
    Jul 2010
    Posts
    119
    Answers
    4

    Default Passing arguments to window's Show event

    Hello!

    I'm trying to pass an argument (a gridview record gathered from the cellblclick event) to a window's show() event.

    I think I will need to use delegate to do it:

    http://stackoverflow.com/questions/6...-extjs-handler

    But I don't know how well it jives in MVC. I got my window defined in my view's physical file:

    Code:
    Ext.define('EditPortalUserWindow', {
        alias: 'widget.EditPortalUserWindow',
        extend: 'Ext.Window',
        height: 400,
        width: 400,
        modal: true,
        title; 'Bleh'
    });
    Then in my controler, in the celldblclick listener:

    Code:
    //record is an argument from the celldblclick event...
    PortalUI.MainContent.Utilities.showEditUserWindow(record);
    
    //showEditUserWindow does this:
    Ext.widget('EditPortalUserWindow').show();
    I am a little confused about the scoping between view/controller. Has anyone done this before ?

    Thanks.

    Using 4.2.1

  2. #2
    Sencha User
    Join Date
    Jul 2010
    Posts
    119
    Answers
    4

    Default

    Turns out you can simply do something as such:

    Code:
    var win = Ext.widget('EditPortalUserWindow');
    win.whatEverData = 'Hello';
    win.show();
    Then you will be able to access "whatEverData" from the listeners' methods...

Posting Permissions

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