Threaded View

  1. #1
    Sencha User deepakgarg89's Avatar
    Join Date
    Nov 2012
    Location
    Gurgaon, India
    Posts
    43
    Vote Rating
    0
    Answers
    4
    deepakgarg89 is on a distinguished road

      0  

    Default Answered: Change view in sencha touch 2

    Answered: Change view in sencha touch 2


    I had make a controller in sencha touch 2 in which i am performing an ajax request.

    I want to change the view on suceess.

    Currently i am using
    var firststep = Ext.create('Myapp.view.Rangeselector'); Ext.getCmp('loginForm').destroy();
    Ext.Viewport.add(firststep);

    It is destroying loginForm but didn't load Rangeselector view.

    Can anyone please give me a solution.

  2. Hi deepakgarg89,

    try this:
    Code:
    var firststep = Ext.create('Myapp.view.Rangeselector');
    Ext.Viewport.setActiveItem(firststep);
    It's not enough to just add your view to the viewport, you already have to navigate to it

    Best regards,
    Schildi