Permalink
Browse files

Closes #888. No more duplicate Screen/Wizard notifications on the fir…

…st screen
  • Loading branch information...
1 parent b98cfdc commit 7f57e5d64521569093e141a6188f095d47910a56 @dpp dpp committed Mar 16, 2011
@@ -1169,9 +1169,8 @@ trait LiftRules extends Factory with FormVendor with LazyLoggable {
List("Expires" -> d,
"Date" -> d,
"Cache-Control" ->
- "no-cache; private; no-store",
- "Pragma" -> "no-cache" /*,
- "Keep-Alive" -> "timeout=3, max=993" */ )
+ "no-cache, private, no-store",
+ "Pragma" -> "no-cache" )
}
/**
@@ -396,7 +396,7 @@ trait AbstractScreen extends Factory {
case AFilter(f) => f
}.toList
- override def is = underlying.is
+ override def is = underlying.get
override def get = underlying.get
override def set(v: T) = underlying.set(setFilter.foldLeft(v)((v, f) => f(v)))
@@ -461,7 +461,7 @@ trait AbstractScreen extends Factory {
case AFilter(f) => f
}.toList
- override def is = underlying.open_!.is
+ override def is = underlying.open_!.get
override def get = underlying.open_!.get
override def set(v: T) = underlying.open_!.set(setFilter.foldLeft(v)((v, f) => f(v)))
@@ -789,7 +789,7 @@ trait AbstractScreen extends Factory {
trait ScreenWizardRendered {
protected def wrapInDiv(in: NodeSeq): Elem =
- <div style="display: inline" id={FormGUID.is}>{in}</div>
+ <div style="display: inline" id={FormGUID.get}>{in}</div>
protected def renderAll(currentScreenNumber: Box[NodeSeq],
screenCount: Box[NodeSeq],
@@ -918,7 +918,7 @@ trait ScreenWizardRendered {
snapshot.restore();
val res = cancelId._2() // WizardRules.deregisterWizardSession(CurrentSession.is)
if (!ajax_?) {
- S.seeOther(Referer.is)
+ S.seeOther(Referer.get)
}
res
})}</form>
@@ -996,9 +996,9 @@ trait ScreenWizardRendered {
/**
* What should be done at the end of an Ajax session. By
- * default, RedirectTo(Referer.is)
+ * default, RedirectTo(Referer.get)
*/
- protected def calcAjaxOnDone: JsCmd = RedirectTo(Referer.is)
+ protected def calcAjaxOnDone: JsCmd = RedirectTo(Referer.get)
/**
* Should all instances of this Wizard or Screen unless
@@ -1019,9 +1019,9 @@ trait ScreenWizardRendered {
protected def redirectBack(): JsCmd = {
if (ajaxForms_?) {
- AjaxOnDone.is
+ AjaxOnDone.get
} else {
- S.seeOther(Referer.is)
+ S.seeOther(Referer.get)
}
}
@@ -1032,7 +1032,7 @@ trait ScreenWizardRendered {
* If the ajax=true attribute is present on the original snippet
* invocation, the forms will be ajax.
*/
- protected def ajaxForms_? : Boolean = Ajax_?.is
+ protected def ajaxForms_? : Boolean = Ajax_?.get
}
@@ -1095,8 +1095,8 @@ trait LiftScreen extends AbstractScreen with StatefulSnippet with ScreenWizardRe
}
protected def createSnapshot = {
- val prev = PrevSnapshot.is
- new ScreenSnapshot(ScreenVars.is, prev)
+ val prev = PrevSnapshot.get
+ new ScreenSnapshot(ScreenVars.get, prev)
}
/**
@@ -1142,28 +1142,28 @@ trait LiftScreen extends AbstractScreen with StatefulSnippet with ScreenWizardRe
def set[T](name: String, from: ScreenVar[_], value: T): Unit =
- ScreenVars.set(ScreenVars.is + (name -> (from, value)))
+ ScreenVars.set(ScreenVars.get + (name -> (from, value)))
def clear(name: String): Unit =
- ScreenVars.set(ScreenVars.is - name)
+ ScreenVars.set(ScreenVars.get - name)
}
def toForm: NodeSeq = {
- Referer.is // touch to capture the referer
- Ajax_?.is // capture the ajaxiness of these forms
- FormGUID.is
+ Referer.get // touch to capture the referer
+ Ajax_?.get // capture the ajaxiness of these forms
+ FormGUID.get
if (FirstTime) {
FirstTime.set(false)
localSetup()
val localSnapshot = createSnapshot
- val notices = S.getAllNotices
+ // val notices = S.getAllNotices
// if we're not Ajax,
if (!ajaxForms_?) {
S.seeOther(S.uri, () => {
- S.appendNotices(notices)
+ // S.appendNotices(notices)
localSnapshot.restore
})
}
@@ -454,7 +454,7 @@ private[http] object TransientRequestVarHandler extends CoreRequestVarHandler {
type MyType = TransientRequestVar[_]
}
-private[http] trait CoreRequestVarHandler extends Logger {
+private[http] trait CoreRequestVarHandler {
type MyType <: HasLogUnreadVal
private val logger = Logger(classOf[CoreRequestVarHandler])
@@ -492,8 +492,6 @@ private[http] trait CoreRequestVarHandler extends Logger {
case null =>
if (LiftRules.throwOnOutOfScopeVarAccess) {
throw new IllegalAccessException("Access to Var outside a request or comet actor scope")
- } else {
- logger.warn("Access to Var outside a request or comet actor scope")
}
None
case x => Full(x)
@@ -145,9 +145,9 @@ trait Wizard extends StatefulSnippet with Factory with ScreenWizardRendered {
if (!ajaxForms_?) {
val localSnapshot = createSnapshot
- val notices = S.getAllNotices
+ // val notices = S.getAllNotices
S.seeOther(S.uri, () => {
- S.appendNotices(notices)
+ // S.appendNotices(notices)
localSnapshot.restore
})
}

0 comments on commit 7f57e5d

Please sign in to comment.