Browse files

* Fixes 805 - snippet Msgs.ShowAll should not be a session var

By being a SessionVar, it meant that if you had two pages, one with showAll=true and the second
page with showAll=false (or omitted), messages that correspond to an ID would show or not
depending on which page was loaded last (setting the SessionVar to true or false).

Now we use a RequestVar and all is well.
  • Loading branch information...
1 parent 239c28c commit 0a982486389803a6d88f7cc9438823ef8d64c2d6 @fmpwizard fmpwizard committed Jun 20, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 web/webkit/src/main/scala/net/liftweb/builtin/snippet/Msgs.scala
@@ -18,12 +18,15 @@ package net.liftweb
package builtin
package snippet
-import net.liftweb.http.{DispatchSnippet,LiftRules,NoticeType,S,SessionVar}
+import http._
import scala.xml._
import net.liftweb.util.Helpers._
import net.liftweb.http.js._
import JsCmds._
import net.liftweb.common.{Box, Full, Empty}
+import common.Full
+import xml.Text
+import snippet.AjaxMessageMeta
@@ -219,8 +222,8 @@ object MsgsErrorMeta extends SessionVar[Box[AjaxMessageMeta]](Empty) {
* This SessionVar records whether to show id-based messages in
* addition to non-id messages.
-object ShowAll extends SessionVar[Boolean](false) {
- override private[liftweb] def magicSessionVar_? = true
+object ShowAll extends RequestVar[Boolean](false) {
+ //override private[liftweb] def magicSessionVar_? = true

0 comments on commit 0a98248

Please sign in to comment.