1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    13
    Vote Rating
    0
    utkarshk.leeway is on a distinguished road

      0  

    Default Unanswered: How to manage "Remember me" and Sessions

    Unanswered: How to manage "Remember me" and Sessions


    Hi team,

    I have made an application in EXTJS using PHP. when i leave my application for sometime stale in no activity mode/ sever sessions are gone, and any of the store can not fetch any data from any webservice. it returns null and thus the UI do not get filled by data at all.

    at this point i want user to be redirected to login page and login again and to show him such an alert stating the same.

    please let me know how can i do that using extjs.


    Regards
    UT

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    catch the response in a callback, display a message and post a form. Thats the way I do it.

    For example;

    Code:
    callback: function(param1, param2, param3){ //params depends on the callback you use
    
    Ext.Msg.confirm(connectionErrorHdr, connectionErrorMsg, //some vars with stringmessages for title and body
                   
                   function(btn) {
    
                        if (btn == 'yes') {
                           //do nothing                 
                        }
    
                        if (btn == 'no') {
                             document.form_screen.submit();
                        }
    
                    }
                );   
    }
    but there are probably more elegant ways to do it

Thread Participants: 1

Tags for this Thread