-
4 Dec 2012 3:21 PM #1
Answered: Logout Redirect in Controller
Answered: Logout Redirect in Controller
Hi All,
I have a button for the user to logout and should redirect to the login page. I have a logout.jsp file that handles the redirect. How do I call the file in my controller? I posted my controller code below.
Ext.define('UI.controller.LogoutController', {
extend : 'Ext.app.Controller',
views : ['HomePageHeader'],
init : function() {
console.log('INFO : Logout controller initiated');
this.control({
'menu component[action=logoutClick]' : {
click : this.onLogoutClick,
}
});
},
onLogoutClick : function() {
Ext.Ajax.request({
url: 'portalUI/logout.jsp'
})
}
})
Thanks in advance.
-
Best Answer Posted by slemmon
See if this works for you
Code:onLogoutClick: function () { window.location = 'portalUI/logout.jsp'; //redirects to url }
-
4 Dec 2012 10:07 PM #2
See if this works for you
Code:onLogoutClick: function () { window.location = 'portalUI/logout.jsp'; //redirects to url }
-
5 Dec 2012 9:59 AM #3


Reply With Quote