1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    14
    Vote Rating
    0
    marioferrara is on a distinguished road

      0  

    Default Answered: Automatic Change View

    Answered: Automatic Change View


    Hello,
    I have a question: how I have 2 views, how can switch to another view automatically? after some defined seconds?

    Best regards
    Mario

  2. Hi marioferrara,

    assumed you already have your 2 views added to the viewport, you could do something like
    Code:
    var duration = 2000; // = 2 seconds
    window.setTimeout(function() {
        Ext.Viewport.setActiveItem(yourSecondViewsXtype);
    }, duration);
    Best regards,
    Schildi

  3. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    83
    Answers
    16
    Vote Rating
    11
    Schildi will become famous soon enough

      0  

    Default


    Hi marioferrara,

    assumed you already have your 2 views added to the viewport, you could do something like
    Code:
    var duration = 2000; // = 2 seconds
    window.setTimeout(function() {
        Ext.Viewport.setActiveItem(yourSecondViewsXtype);
    }, duration);
    Best regards,
    Schildi

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    14
    Vote Rating
    0
    marioferrara is on a distinguished road

      0  

    Default


    Thank you. It works!
    But now i have another problem:
    this solution is correct but change my first view automatically.
    I want that this change starts with a specific view: the third.
    How can i do this?

    Tnx a lot!

  5. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    14
    Vote Rating
    0
    marioferrara is on a distinguished road

      0  

    Default


    Hello,
    I have tried others solutions, but do not works..

    Can you help me?

    Tnx a lot!

  6. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    14
    Vote Rating
    0
    marioferrara is on a distinguished road

      0  

    Default


    It works!

    Just put the code in the correct controller action!

    Many thanks.

Thread Participants: 1