Results 1 to 3 of 3

Thread: comp is undefined on view.show()

  1. #1
    Sencha Premium User
    Join Date
    Mar 2012
    Location
    germany
    Posts
    28

    Default comp is undefined on view.show()

    Hello,

    I'm trying to show a view with a toolbar on top, a statusbar on bottom and a grid in center.
    First of all i must say that i've not a border layout. It's important because i already got answers about that, and that's not the problem.

    I tried to rebuild the view, and i got the same error.

    Code:
    Ext.define('ZLNetAdmin.view.ZuordnungView2', {
        extend: 'Ext.window.Window',
    
        requires: [
            'ZLNetAdmin.view.Statusbar'
        ],
    
        height: 250,
        id: 'ZuordnungView2',
        width: 400,
        layout: {
            type: 'fit'
        },
        title: 'My Window',
    
        initComponent: function() {
            var me = this;
    
            Ext.applyIf(me, {
                dockedItems: [
                    {
                        xtype: 'toolbar',
                        dock: 'top'
                    },
                    {
                        xtype: 'StatusBar',
                        dock: 'bottom'
                    }
                ],
                items: [
                    {
                        xtype: 'gridpanel',
                        title: 'My Grid Panel',
                        store: 'BetriebeNameStore',
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'BetriebeID',
                                text: 'BetriebeID'
                            },
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'BetriebeName',
                                text: 'Betriebename'
                            }
                        ],
                        listeners: {
                            beforerender: {
                                fn: me.onGridpanelBeforeRender,
                                scope: me
                            }
                        }
                    }
                ]
            });
    
            me.callParent(arguments);
        }
    });
    Last edited by mitchellsimoens; 21 Mar 2013 at 6:24 AM. Reason: added CODE tags

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    Just by the code your provide, there doesn't seem to be an issue.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium User
    Join Date
    Mar 2012
    Location
    germany
    Posts
    28

    Default

    Hello Mitchell,

    First of all, thanks you for your answer.
    It's right, the problem was not on this. In fact , for rendering this view i have to choos an item in a menu, and as i changed to ext.4.2, the problem was that a destroy of this menu was done too late (this.destroy onDeactivate event from menu, so that i can call him as i want without any dom problems), now i destroy the menu in a onHide event and the problem is away.

    But let me know something else now:

    I try to create through ext.architect a statusbar, for this i do that:
    - in main menu i do "edit" and "new component"
    -then i choos in type list toolbar, and give to this new component the name "Statusbar"
    -then i have to do the override, and here i don't know exactely:

    how is made the relation between the new component and the statusbar.js?
    can you exlain me what to do in architect after that?

    Please help me if you can, this is one of the most important problem i have to create ux component in ext.architect.

Posting Permissions

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