
Kwf.ViewportWithoutMenu = Ext2.extend(Ext2.Viewport, {
    layout: 'fit',
    mabySubmit: function(cb, options) {
        var ret = true;
        this.items.each(function(i) {
            if (i.mabySubmit && !i.mabySubmit(cb, options)) {
                ret = false;
                return false; //break each
            }
        }, this);
        return ret;
    }

});

Kwf.Viewport = Ext2.extend(Kwf.ViewportWithoutMenu, {
    initComponent: function()
    {
        Kwf.menu = Ext2.ComponentMgr.create({
                    xtype: 'kwf.menu',
                    region: 'north',
                    height: 30
                });
        this.items.push({
            xtype: 'kwf.menu',
            region: 'north',
            height: 30
        });
        this.layout = 'border';
        Kwf.Viewport.superclass.initComponent.call(this);
    }
});


Kwf.ViewportWithoutMenu = Ext2.extend(Ext2.Viewport, {
    layout: 'fit',
    mabySubmit: function(cb, options) {
        var ret = true;
        this.items.each(function(i) {
            if (i.mabySubmit && !i.mabySubmit(cb, options)) {
                ret = false;
                return false; //break each
            }
        }, this);
        return ret;
    }

});

Kwf.Viewport = Ext2.extend(Kwf.ViewportWithoutMenu, {
    initComponent: function()
    {
        Kwf.menu = Ext2.ComponentMgr.create({
                    xtype: 'kwf.menu',
                    region: 'north',
                    height: 30
                });
        this.items.push(Kwf.menu);
        this.layout = 'border';
        Kwf.Viewport.superclass.initComponent.call(this);
    }
});

Fix Menu reload after re-login
Fix Menu reload after re-login

This bug existed for ages. After re-login there always was this 'this.tr is undefined' error.
Problem was that two menu objects where created and the one actually rendered was not set to Kwf.menu. That caused the reload for the wrong object.
