• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[SOLVED] MVC popup window from controller

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] MVC popup window from controller

    I have a window class
    Code:
    Ext.define('PurchaseOrder.view.AddPOWindow', {
    	extend: 'Ext.window.Window',
    	alias: 'widget.purchaseorderaddpowindow',
            ...
    In my controller, from everything I've read, this should display my component:
    Code:
    fnNewPo: function() {
    		//Open the add window
    		var newAddWindow = Ext.widget('purchaseorderaddpowindow');
    		//newAddWindow.show();
    	},
    It does nothing. if I un-comment the show(), it gives an error "cannot call method substring of undefined"

  • #2
    Is your controller loading your window class via the requires config?

    Code:
    Ext.define('PurchaseOrder.controller.MyController',{
        extend : 'Ext.app.Controler',
        requires : [
            'PurchaseOrder.view.AddPOWindow'
        ],
        ...
    });

    Comment


    • #3
      In controller:

      Code:
      requires: ['PurchaseOrder.view.poGrid', 'PurchaseOrder.view.Viewport', 'PurchaseOrder.view.AddPOWindow'],

      Comment


      • #4
        In your index file, include file ext-all-dev.js rather than ext-all.js or ext-all-debug.js. Then try it again with your console up.

        Comment


        • #5
          Ok, thanks for that. I found the issue. I had a layout of 'form' on the window. worked in my ext 3 app. Looking in the API, form is not an option for layout any longer.

          Comment

          Working...
          X