Permalink
Browse files

Add default liftAjax. and liftComet.lift_sessionLoss.

The default implementation of liftComet.lift_sessionLoss uses
LiftRules.noCometSessionPage to do a redirect, while liftAjax's does a
page reload (which is what we'd rather have liftComet's do, but we need
to be backwards-compatible with noCometSessionPage).
  • Loading branch information...
Shadowfiend committed Jun 25, 2012
1 parent 3ac4213 commit 8bb4e6db6ce5832907a88b5ef0c3b0ca30655b60
Showing with 9 additions and 0 deletions.
  1. +9 −0 web/webkit/src/main/scala/net/liftweb/http/js/ScriptRenderer.scala
@@ -111,6 +111,11 @@ object ScriptRenderer {
"""
},
+
+ lift_sessionLoss: function() {
+ location.reload();
+ },
+
lift_doAjaxCycle: function() {
if (liftAjax.lift_doCycleQueueCnt > 0) liftAjax.lift_doCycleQueueCnt--;
var queue = liftAjax.lift_ajaxQueue;
@@ -251,6 +256,10 @@ object ScriptRenderer {
setTimeout("liftComet.lift_cometEntry();",""" + LiftRules.cometFailureRetryTimeout + """);
},
+ lift_sessionLoss: function() { """ +
+ JsCmds.RedirectTo(LiftRules.noCometSessionPage).toJsCmd +
+ """},
+
lift_cometEntry: function() {
var isEmpty = function(){for (var i in lift_toWatch) {return false} return true}();
if (!isEmpty) {

0 comments on commit 8bb4e6d

Please sign in to comment.