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

      0  

    Default Hi,

    Hi,


    My app follow the below navigation

    Home View -> Login View -> Campaign View

    When a user tap on home view it redirects user to login view with below code

    Code:
    var loginstep = Ext.create('Myapp.view.Login');
    Ext.Viewport.setActiveItem(loginstep);
    When a user tap submit login form on Login view than it redirects user to campaign view with below code

    Code:
    success: function(response) {
                    if(response.MESSAGE == 'success') {
                        Ext.Viewport.setMasked(false);
                        var firststep = Ext.create('Myapp.view.Campaignlist');
                        Ext.Viewport.setActiveItem(firststep);       
                    }
    }
    Now i had a logout button on campaign view. I want when a user tap on it, user must go to home screen and agin the process should be continue.

    For logout i had make a button with below code

    Code:
    {
                    xtype: 'button',
                    docked: 'bottom',
                    ui: 'decline',
                    style: 'border-radius:0',
                    text: 'Logout',
                    action: 'logoutuser'
    }
    Also make a function for logoutuser action in controller

    Code:
    logout: function() {
            Ext.Msg.confirm("Confirmation.....",
                "Are you sure you want to logout?",
                function ( answer ) {
                    if(answer == 'yes') {
                        var loginstep1 = Ext.create('Myapp.view.Home');
                        Ext.Viewport.animateActiveItem(loginstep1, {type: 'slide', direction: 'right'});
    
                        //Ext.Viewport.add(loginstep1);      Also tried this code
                        //Ext.Viewport.setActiveItem(loginstep1);
                    }
                });
        }
    Using above codes user redirecting to home view but when i tried to again go to login view than the app break and nothing happened.

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

      0  

    Default


    Hmm...this is strange.
    What version of Sencha Touch are you using?

    I created a quick SenchaFiddle to simulate your app structure. Maybe you can have a look at this and compare it to your code. I hope my example does exactly this what you want to achieve? It definitely works
    Here's the link: http://www.senchafiddle.com/#O9nRv

    Best regards,
    Schildi

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

      0  

    Default Hi Schildi,

    Hi Schildi,


    Thanks for sharing your precious time. Issue is now resolved.

  4. #14
    Sencha User
    Join Date
    May 2012
    Posts
    57
    Vote Rating
    0
    vikramiyer is on a distinguished road

      0  

    Default


    Any solutions found so far??

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."