Results 1 to 3 of 3

Thread: how to open window from one designer project from button click in another project

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    13
    Vote Rating
    0
      0  

    Default how to open window from one designer project from button click in another project

    Hi,

    I do not think this is a deisnger question as this will all be done in the generated .js file. I have two projects in designer. The first is a viewport with a button in it. The second is a Window. how do I call the window from the button? The following will open the window in side a window (not at all desireable).

    onDistCodeClick: function() {
    var win = new Ext.Window({
    width:600,
    height:600,
    title:"Ext Window Example",
    autoScroll:true,
    modal:true,
    html: '<iframe style="width:100%;height:100%" src="http://nasrvri95217/webforms/DistBrow/designer.html"></iframe>'
    });
    win.show();
    },

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    What do you mean call the window from the button?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    13
    Vote Rating
    0
      0  

    Default

    The first project has a root container of a viewport. To simplify, envision a single button on that viewport (obviously not real-world).

    The second project has a Window as the root container.

    The first project is what is run http://<myServer>/<myApp>/designer.html. I want to call the window I created in the second project so that it comes up inside the current browser in the "click" function.

    Since I'm using designer, the two projects are exported to separate locations on the web server. The generated designer.js for each product are as follows:
    First Project:

    Ext.Loader.setConfig({
    enabled: true
    });Ext.application({
    name: 'MyApp',
    stores: [
    'MainTreeStore',
    'storeCurrency',
    'storeCountries',
    'storePriceCode'
    ],
    launch: function() {
    Ext.QuickTips.init();
    var cmp1 = Ext.create('MyApp.view.vpOrionSales', {
    renderTo: Ext.getBody()
    });
    cmp1.show();
    }
    });

    Second Project:

    Ext.Loader.setConfig({
    enabled: true
    });
    Ext.application({
    name: 'MyApp',
    stores: [
    'storeDist'
    ],
    launch: function() {
    Ext.QuickTips.init();
    var cmp1 = Ext.create('MyApp.view.MyWindow', {
    renderTo: Ext.getBody()
    });
    cmp1.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
  •