How to properly go to another webpage on button Click?

68 Views Asked by At

I have created two interfaces reportsview and mainview (alias widget.main) : is it of good practice to go from the former to the latter (onClick) using this ExtJS logic :

var reportsViewInstance = Ext.getCmp('reportsview');
        
        if (reportsViewInstance) {
            reportsViewInstance.destroy();
            
        }

        var mainV2 = Ext.create('widget.main', {
            renderTo: Ext.getBody(),
            hideMode: 'visibility'
        });

        mainV2.show();

Or do i have to call the mainview using another logic for instance using getView()... ? Thanks for this clarification

0

There are 0 best solutions below