• 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.

Problem in Hook.js, trying to access missing Ext classes

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

  • #16
    Here is the relevant code...

    in the Hook.js on the 'PortalMenu' rendered event,

    Code:
            exportController = Portal.getApplication().getController('WMS.util.export.controller.Main');
            exportController.init();
            exportController.onLaunch();
    this obviously calls the init and onLaunch functions on the 'exportController',

    Code:
        init: function() {
    
            this.control({
                '#exportCancelButton': {
                    click: this.onClickCloseWindow
                },
                '#initExportButton': {
                    click: this.onExportButtonClick
                },
                '#pdfRadioButton': {
                    change: this.onFormatSelected
                },
                '#xlsxRadioButton': {
                    change: this.onFormatSelected
                }
            });
    
        }
    Code:
        onLaunch: function() {
    
            var columnStore = Ext.create('WMS.util.export.store.Column');
            Ext.create('WMS.util.export.store.PageSize');
            Ext.create('WMS.util.export.store.PageOrientation');
    
            // Subscribe to datachanged event to automatically update the item selector;
            columnStore.on({
                datachanged: this.onDataChange,
                scope: this
            });
    
            return Ext.create('WMS.util.export.view.Window');
    
        }
    as you can see this then creates the 'exportWindow' or 'WMS.util.export.view.Window'. In this window we create a 'form' with a 'tabPanel' and it is when the 'tabPanel' is being created we are getting the error that I mentioned.

    Code:
    xtype: 'form',
                itemId: 'exportForm',
                layout: 'fit',
                items: [{
                    xtype: 'tabpanel',
                    bodyPadding: 10,
                    defaults: {
                        layout: 'fit',
                        style: {
                            padding: '10px'
                        }
                    },
                    deferredRender: false,
                    height: 200,
                    itemId: 'exporttabpanel',
                    layout: 'fit',
                    tabPosition: 'left',
                    tabBar: {
                        cls: 'wms-vertical-tabbar'
                    },
                    items: [{...
    I have seen a similar error in another on the posts on the forum - http://cnxforum.com/showthread.php?1...g-Login-Window - I have tried the steps suggested in this post but it seems to prevent the Hook.js from working...

    Comment

    Working...
    X