PDA

View Full Version : Regarding to page session out



aomadevelopers
24 Aug 2009, 6:04 AM
Hi,

I have a requirement like ,

When user in one page ,session shouldnot time out untill and unless he clicked on anotherpage and vice versa.

for this i am using ext.util.observable but i have some doubt in my code,

Ext.data.Connection.on('beforerequest', function(con, options) {
console.log("Ajax request made to " + options.url);
});</code></pre>
* @param {Function} c The class constructor to make observable.
* @member Ext.util.Observable
* @method observeClass
* @static
*/
Ext.util.Observable.observeClass = function(c) {
Ext.apply(c, new Ext.util.Observable());
c.prototype.fireEvent = function() {
return (c.fireEvent.apply(c, arguments) !== false) &&
(Ext.util.Observable.prototype.fireEvent.apply(this, arguments) !== false);
};
};
Ext.override(Ext.util.Observable, {
addListener: Ext.util.Observable.prototype.addListener.createInterceptor(function() {
if (!this.events) {
this.events = {};
}
})
});
Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener;
// Add observability to the Connection class
Ext.util.Observable.observeClass(Ext.data.Connection);
// Reset the session timeout countdown on every Ajax return
Ext.data.Connection.on('requestcomplete', AU.startTimeout);

in that what is AU? where it defined and what is there inside of AU.starttimeout

please let me know


thanks in advance

jay@moduscreate.com
24 Aug 2009, 6:55 AM
Please post your code within code tags! Thanks in advance.