Sencha Touch - Redirect to another view

点点圈 提交于 2019-12-04 19:17:08

You need create a ref for your HomeView:

    refs: {
        HomeView: {
            autoCreate: true,
            selector: 'HomeView',
            xtype: 'HomeView'
        },
    }

And set this view active:

    Ext.Viewport.setActiveItem(this.getHomeView());

If you use Sencha Touch 2, you should use Route to redirect to another page. So, it wil be like this:

this.redirectTo('home');

Then create a controller with has a route "home"

FOr more information about routes. http://docs.sencha.com/touch/2-0/#!/guide/controllers-section-4

Try this. may be this work.

authenticateUser: function (button) {
        loginForm.submit({
        method: 'POST',
        success: function (form, result) {

         var home= Ext.create('Mobile.view.HomeView');
         Ext.getCmp('loginFormPanel').destroy();
         Ext.Viewport.add(paneltab);

        }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!