Skip to content

Commit

Permalink
* Fixes 805 - snippet Msgs.ShowAll should not be a session var
Browse files Browse the repository at this point in the history
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
fmpwizard committed Jun 20, 2012
1 parent 239c28c commit 0a98248
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -18,12 +18,15 @@ package net.liftweb
package builtin package builtin
package snippet package snippet


import net.liftweb.http.{DispatchSnippet,LiftRules,NoticeType,S,SessionVar} import http._
import scala.xml._ import scala.xml._
import net.liftweb.util.Helpers._ import net.liftweb.util.Helpers._
import net.liftweb.http.js._ import net.liftweb.http.js._
import JsCmds._ import JsCmds._
import net.liftweb.common.{Box, Full, Empty} import net.liftweb.common.{Box, Full, Empty}
import common.Full
import xml.Text
import snippet.AjaxMessageMeta




/** /**
Expand Down Expand Up @@ -219,8 +222,8 @@ object MsgsErrorMeta extends SessionVar[Box[AjaxMessageMeta]](Empty) {
* This SessionVar records whether to show id-based messages in * This SessionVar records whether to show id-based messages in
* addition to non-id messages. * addition to non-id messages.
*/ */
object ShowAll extends SessionVar[Boolean](false) { object ShowAll extends RequestVar[Boolean](false) {
override private[liftweb] def magicSessionVar_? = true //override private[liftweb] def magicSessionVar_? = true
} }


/** /**
Expand Down

0 comments on commit 0a98248

Please sign in to comment.