Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added eager evaluation

  • Loading branch information...
commit c16b707d6f1383b02454cfc4b2b01aeaad7d0e44 1 parent 4f9d7a2
@dpp dpp authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 web/webkit/src/main/scala/net/liftweb/http/S.scala
View
10 web/webkit/src/main/scala/net/liftweb/http/S.scala
@@ -1916,6 +1916,16 @@ for {
def setVars[T](attr: MetaData)(f: => T): T = withAttrs(attr)(f)
/**
+ * A function that will eagerly evaluate a template.
+ */
+ def eagerEval : NodeSeq => NodeSeq = ns => {
+ S.session match {
+ case Full(session) => session.processSurroundAndInclude("Eager Eval", ns)
+ case _ => ns
+ }
+ }
+
+ /**
* Initialize the current request session if it's not already initialized.
* Generally this is handled by Lift during request processing, but this
* method is available in case you want to use S outside the scope
Please sign in to comment.
Something went wrong with that request. Please try again.