Skip to content

Commit

Permalink
Rename sessionLoss to sessionLost for loss handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfiend committed Jun 25, 2012
1 parent 8bb4e6d commit dae24b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala
Expand Up @@ -601,7 +601,7 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {
/**
* Where to send the user if there's no comet session. Note that this is
* contingent on an unchanged LiftRules.noCometSessionCommand and on
* liftComet.lift_sessionLoss not being overridden client-side.
* liftComet.lift_sessionLost not being overridden client-side.
*/
@scala.deprecated("Use LiftRules.noCometSessionCmd.")
@volatile var noCometSessionPage = "/"
Expand All @@ -613,28 +613,28 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {
* request comes in for a session that has no associated comet actors
* (this typically happens when the server restarts).
*
* By default, we invoke liftComet.lift_sessionLoss, which can be
* By default, we invoke liftComet.lift_sessionLost, which can be
* overridden client-side for more complex work.
* liftComet.lift_sessionLoss redirects to
* liftComet.lift_sessionLost redirects to
* LiftRules.noCometSessionPage by default for now, though
* noCometSessionPage is deprecated and will be replaced by a
* default of reloading the current page.
*/
val noCometSessionCmd = new FactoryMaker[JsCmd](
() => JsCmds.Run("liftComet.lift_sessionLoss()")
() => JsCmds.Run("liftComet.lift_sessionLost()")
) {}

/**
* The JsCmd to execute when the ajax session is lost. The ajax
* session is considered lost when either an ajax request comes in for
* a session that does not exist on the server.
*
* By default, we invoke liftAjax.lift_sessionLoss, which can be
* By default, we invoke liftAjax.lift_sessionLost, which can be
* overridden client-side for more complex work.
* liftAjax.lift_sessionLoss reloads the page by default.
* liftAjax.lift_sessionLost reloads the page by default.
*/
val noAjaxSessionCmd = new FactoryMaker[JsCmd](
() => JsCmds.Run("liftAjax.lift_sessionLoss()")
() => JsCmds.Run("liftAjax.lift_sessionLost()")
) {}

/**
Expand Down Expand Up @@ -1351,8 +1351,9 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {

/**
* Set to false if you do not want ajax/comet requests that are not
* associated with a session to call their sessionLoss handlers (these
* are the client-side liftAjax.sessionLoss and liftComet.sessionLoss functions).
* associated with a session to call their respective session
* loss handlers (set via LiftRules.noAjaxSessionCmd and
* LiftRules.noCometSessionCmd).
*/
@volatile var redirectAsyncOnSessionLoss = true
@deprecated("Use redirectAsyncOnSessionLoss instead.")
Expand Down
Expand Up @@ -112,7 +112,7 @@ object ScriptRenderer {
},
lift_sessionLoss: function() {
lift_sessionLost: function() {
location.reload();
},
Expand Down Expand Up @@ -256,7 +256,7 @@ object ScriptRenderer {
setTimeout("liftComet.lift_cometEntry();",""" + LiftRules.cometFailureRetryTimeout + """);
},
lift_sessionLoss: function() { """ +
lift_sessionLost: function() { """ +
JsCmds.RedirectTo(LiftRules.noCometSessionPage).toJsCmd +
"""},
Expand Down

0 comments on commit dae24b4

Please sign in to comment.