Object/Trait

net.liftweb.http

S

Related Docs: trait S | package http

Permalink

object S extends S

An object representing the current state of the HTTP request and response. It uses the DynamicVariable construct such that each thread has its own local session info without passing a huge state construct around. The S object is initialized by LiftSession on request startup.

See also

LiftFilter

LiftSession

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. S
  2. S
  3. UserAgentCalculator
  4. Loggable
  5. HasParams
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait AFuncHolder extends (List[String]) ⇒ Any with Serializable

    Permalink

    Abstrats a function that is executed on HTTP requests from client.

  2. case class CookieHolder(inCookies: List[HTTPCookie], outCookies: List[HTTPCookie]) extends Product with Serializable

    Permalink

    The CookieHolder class holds information about cookies to be sent during the session, as well as utility methods for adding and deleting cookies.

    The CookieHolder class holds information about cookies to be sent during the session, as well as utility methods for adding and deleting cookies. It is used internally.

    See also

    # findCookie

    # responseCookies

    # receivedCookies

    # deleteCookie

    # addCookie

    # _init

    # _responseCookies

  3. case class DispatchHolder(name: String, dispatch: DispatchPF) extends Product with Serializable

    Permalink

    DispatchHolder holds a partial function that maps a Req to a LiftResponse.

    DispatchHolder holds a partial function that maps a Req to a LiftResponse. It is used for per-session dispatch, as opposed to global dispatch, which are handled by the LiftRules.dispatch RulesSeq. This case class exists so that DispatchPFs may be manipulated by name. See S.addHighLevelSessionDispatcher for example usage.

    See also

    # clearHighLevelSessionDispatcher

    # removeHighLevelSessionDispatcher

    # addHighLevelSessionDispatcher

    # highLevelSessionDispatchList

    LiftRules # dispatch

    LiftResponse

  4. final case class PFPromoter[A, B](pff: () ⇒ PartialFunction[A, B]) extends Product with Serializable

    Permalink
  5. case class RewriteHolder(name: String, rewrite: RewritePF) extends Product with Serializable

    Permalink

    RewriteHolder holds a partial function that re-writes an incoming request.

    RewriteHolder holds a partial function that re-writes an incoming request. It is used for per-session rewrites, as opposed to global rewrites, which are handled by the LiftRules.rewrite RulesSeq. This case class exists so that RewritePFs may be manipulated by name. See S.addSessionRewriter for example usage.

    See also

    LiftRules # rewrite

    # removeSessionRewriter

    # clearSessionRewriter

    # addSessionRewriter

    # sessionRewriter

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ?(str: String, params: Any*): String

    Permalink

    Attempt to localize and then format the given string.

    Attempt to localize and then format the given string. This uses the String.format method to format the localized string. We first try your own bundle resources, if that fails, we try Lift's core bundle.

    str

    the string to localize

    params

    the var-arg parameters applied for string formatting

    returns

    the localized and formatted version of the string

    Definition Classes
    S
    See also

    # resourceBundles

    String.format

  5. def ?(str: String, locale: Locale): String

    Permalink

    Get a localized string or return the original string.

    Get a localized string or return the original string. We first try your own bundle resources, if that fails, we try Lift's core bundle.

    str

    the string to localize

    locale

    specific locale that should be used to localize this string

    returns

    the localized version of the string

    Definition Classes
    S
    See also

    # resourceBundles

  6. def ?(str: String): String

    Permalink

    Get a localized string or return the original string.

    Get a localized string or return the original string. We first try your own bundle resources, if that fails, we try Lift's core bundle.

    str

    the string to localize

    returns

    the localized version of the string

    Definition Classes
    S
    See also

    # resourceBundles

  7. object AFuncHolder extends Serializable

    Permalink

    The companion object that generates AFuncHolders from other functions

  8. object BinFuncHolder extends Serializable

    Permalink
  9. object LFuncHolder extends Serializable

    Permalink
  10. object NFuncHolder extends Serializable

    Permalink
  11. object PFPromoter extends Serializable

    Permalink
  12. object SFuncHolder extends Serializable

    Permalink
  13. def addAnalyzer(f: (Box[Req], Long, List[(String, Long)]) ⇒ Any): Unit

    Permalink

    Add a query analyzer (passed queries for analysis or logging).

    Add a query analyzer (passed queries for analysis or logging). The analyzer methods are executed with the request, total time to process the request, and the List of query log entries once the current request completes.

    Definition Classes
    S
    See also

    # queryLog

    # logQuery

  14. def addAround(lw: LoanWrapper): Unit

    Permalink

    You can wrap the handling of an HTTP request with your own wrapper.

    You can wrap the handling of an HTTP request with your own wrapper. The wrapper can execute code before and after the request is processed (but still have S scope). This allows for query analysis, etc. Wrappers are chained, much like servlet filters, so you can layer processing on the request. As an example, let's look at a wrapper that opens a resource and makes it available via a RequestVar, then closes the resource when finished:

    import net.liftweb.http.{ ResourceVar,S }
    import net.liftweb.util.LoanWrapper
    
    // Where "ResourceType" is defined by you
    object myResource extends ResourceVar[ResourceType](...)
    
    class Boot  {
      def boot  {
        ...
        S.addAround(
          new LoanWrapper  {
            def apply[T](f: => T) : T =  {
              myResource(... code to open and return a resource instance ...)
              f() // This call propagates the request further down the "chain" for template processing, etc.
              myResource.is.close() // Release the resource
    }
    }
        )
        ...
    }
    }
    
    This method is *NOT* intended to change the generated HTTP request or to respond to requests early. LoanWrappers are there to set up and take down state *ONLY*. The LoanWrapper may be called outside the scope of an HTTP request (e.g., as part of an Actor invocation).

    Definition Classes
    S
    See also

    LoanWrapper

    # addAround ( LoanWrapper )

  15. def addAround(lw: List[LoanWrapper]): Unit

    Permalink

    You can wrap the handling of an HTTP request with your own wrapper.

    You can wrap the handling of an HTTP request with your own wrapper. The wrapper can execute code before and after the request is processed (but still have S scope). This allows for query analysis, etc. See S.addAround(LoanWrapper) for an example. This version of the method takes a list of LoanWrappers that are applied in order. This method is *NOT* intended to change the generated HTTP request or to respond to requests early. LoanWrappers are there to set up and take down state *ONLY*. The LoanWrapper may be called outside the scope of an HTTP request (e.g., as part of an Actor invocation).

    Definition Classes
    S
    See also

    LoanWrapper

    # addAround ( LoanWrapper )

  16. def addCleanupFunc(f: () ⇒ Unit): Unit

    Permalink

    Adds a cleanup function that will be executed at the end of the request pocessing.

    Adds a cleanup function that will be executed at the end of the request pocessing. Exceptions thrown from these functions will be swallowed, so make sure to handle any expected exceptions within your function.

    f

    The function to execute at the end of the request.

    Definition Classes
    S
  17. def addComet(cometActor: LiftCometActor): Unit

    Permalink

    Add a comet to the list of comets that should be registered to receive updates on the page currently being rendered or on the page that invoked the currently running callback.

    Add a comet to the list of comets that should be registered to receive updates on the page currently being rendered or on the page that invoked the currently running callback.

    Definition Classes
    S
  18. def addCookie(cookie: HTTPCookie): Unit

    Permalink

    Adds a Cookie to the List[Cookies] that will be sent with the Response.

    Adds a Cookie to the List[Cookies] that will be sent with the Response.

    If you wish to delete a Cookie as part of the Response, use the deleteCookie method.

    An example of adding and removing a Cookie is:

    import net.liftweb.http.provider.HTTPCookie
    
    class MySnippet  {
      final val cookieName = "Fred"
    
      def cookieDemo (xhtml : NodeSeq) : NodeSeq =  {
        var cookieVal = S.findCookie(cookieName).map(_.getvalue) openOr ""
    
        def setCookie()  {
          val cookie = HTTPCookie(cookieName, cookieVal).setMaxAge(3600) // 3600 seconds, or one hour
          S.addCookie(cookie)
    }
    
        bind("cookie", xhtml,
             "value" -> SHtml.text(cookieVal, cookieVal = _),
             "add" -> SHtml.submit("Add", setCookie)
             "remove" -> SHtml.link(S.uri, () => S.deleteCookie(cookieName), "Delete Cookie")
        )
    }
    }
    

    Definition Classes
    S
    See also

    # responseCookies

    # deleteCookie ( String )

    # deleteCookie ( Cookie )

    net.liftweb.http.provider.HTTPCookie

  19. def addFunctionMap(name: String, value: AFuncHolder): Unit

    Permalink

    Associates a name with a function impersonated by AFuncHolder.

    Associates a name with a function impersonated by AFuncHolder. These are basically functions that are executed when a request contains the 'name' request parameter.

    Definition Classes
    S
  20. def addHighLevelSessionDispatcher(name: String, disp: DispatchPF): Box[HashMap[String, DispatchPF]]

    Permalink

    Adds a dispatch function for the current session, as opposed to a global dispatch through LiftRules.dispatch.

    Adds a dispatch function for the current session, as opposed to a global dispatch through LiftRules.dispatch. An example would be if we wanted a user to be able to download a document only when logged in. First, we define a dispatch function to handle the download, specific to a given user:

    def getDocument(userId : Long)() : Box[LiftResponse] =  { ... }
    

    Then, in the login/logout handling snippets, we could install and remove the custom dispatch as appropriate:

      def login(xhtml : NodeSeq) : NodeSeq =  {
        def doAuth ()  {
          ...
          if (user.loggedIn_?)  {
            S.addHighLevelSessionDispatcher("docDownload",  {
              case Req(List("download", "docs"), _, _) => getDocument(user.id)
    } )
    }
    }
    
      def logout(xhtml : NodeSeq) : NodeSeq =  {
        def doLogout ()  {
          ...
          S.removeHighLevelSessionDispatcher("docDownload")
          // or, if more than one dispatch has been installed, this is simpler
          S.clearHighLevelSessionDispatcher
    }
    }
    

    It's important to note that per-session dispatch takes precedence over LiftRules.dispatch, so you can override things set there.

    name

    A name for the dispatch. This can be used to remove it later by name.

    disp

    The dispatch partial function

    Definition Classes
    S
    See also

    # clearHighLevelSessionDispatcher

    # removeHighLevelSessionDispatcher

    LiftRules.dispatch

    LiftRules.DispatchPF

  21. def addSessionRewriter(name: String, rw: RewritePF): Box[HashMap[String, RewritePF]]

    Permalink

    Adds a per-session rewrite function.

    Adds a per-session rewrite function. This can be used if you only want a particular rewrite to be valid within a given session. Per-session rewrites take priority over rewrites set in LiftRules.rewrite, so you can use this mechanism to override global functionality. For example, you could set up a global rule to make requests for the "account profile" page go back to the home page by default:

    package bootstrap.liftweb
    ... imports ...
    class Boot  {
      def boot  {
        LiftRules.rewrite.append  {
          case RewriteRequest(ParsePath(List("profile")), _, _, _) =>
            RewriteResponse(List("index"))
    }
    }
    }
    

    Then, in your login snippet, you could set up a per-session rewrite to the correct template:

    def loginSnippet (xhtml : NodeSeq) : NodeSeq =  {
      ...
      def doLogin ()  {
        ...
        S.addSessionRewriter("profile",  {
          case RewriteRequest(ParsePath(List("profile")), _, _, _) =>
            RewriteResponse(List("viewProfile"), Map("user" -> user.id))
    }
        ...
    }
      ...
    }
    

    And in your logout snippet you can remove the rewrite:

      def doLogout ()  {
        S.removeSessionRewriter("profile")
        // or
        S.clearSessionRewriter
    }
    

    name

    A name for the rewrite function so that it can be replaced or deleted later.

    rw

    The rewrite partial function

    Definition Classes
    S
    See also

    # clearSessionRewriter

    # removeSessionRewriter

    # sessionRewriter

    LiftRules.rewrite

  22. def addSnippetForClass(cls: String, inst: DispatchSnippet): Unit

    Permalink

    Register a stateful snippet for a given class name.

    Register a stateful snippet for a given class name. Only registers if the name is not already set.

    Definition Classes
    S
  23. def appendGlobalJs(js: JsCmd*): Unit

    Permalink

    Add javascript to the page rendering that will execute in the global scope.

    Add javascript to the page rendering that will execute in the global scope. Usually you should use appendJs, so that the javascript runs after the entire dom is available. If you need to declare a global var or you want javascript to execute immediately with no guarantee that the entire dom is available, you may use appendGlobalJs.

    Definition Classes
    S
  24. def appendJs(js: Seq[JsCmd]): Unit

    Permalink

    Sometimes it's helpful to accumulate JavaScript as part of servicing a request.

    Sometimes it's helpful to accumulate JavaScript as part of servicing a request. For example, you may want to accumulate the JavaScript as part of an Ajax response or a Comet Rendering or as part of a regular HTML rendering. Call S.appendJs(jsCmd). The accumulated Javascript will be emitted as part of the response, wrapped in an OnLoad to ensure that it executes after the entire dom is available. If for some reason you need to run javascript at the top-level scope, use appendGlobalJs.

    Definition Classes
    S
  25. def appendJs(js: JsCmd): Unit

    Permalink

    Sometimes it's helpful to accumulate JavaScript as part of servicing a request.

    Sometimes it's helpful to accumulate JavaScript as part of servicing a request. For example, you may want to accumulate the JavaScript as part of an Ajax response or a Comet Rendering or as part of a regular HTML rendering. Call S.appendJs(jsCmd). The accumulated Javascript will be emitted as part of the response, wrapped in an OnLoad to ensure that it executes after the entire dom is available. If for some reason you need to run javascript at the top-level scope, use appendGlobalJs.

    Definition Classes
    S
  26. def appendNotices(list: Seq[(Value, NodeSeq, Box[String])]): Unit

    Permalink

    Add a whole list of notices

    Add a whole list of notices

    Definition Classes
    S
  27. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  28. def assertExceptionThrown(): Unit

    Permalink

    An exception was thrown during the processing of this request.

    An exception was thrown during the processing of this request. This is tested to see if the transaction should be rolled back

    Definition Classes
    S
  29. def atEndOfBody(): List[Elem]

    Permalink

    Get the accumulated Elems for the end of the body

    Get the accumulated Elems for the end of the body

    Definition Classes
    S
    See also

    putAtEndOfBody

  30. object attr extends AttrHelper[Box]

    Permalink

    Used to get an attribute by its name.

    Used to get an attribute by its name. There are several means to getting attributes:

      // Get a Box for the attribute:
      val myAttr = S.attr("test") openOr "Not found"
    
      // Get an attribute or return a default value:
      val myAttr = S.attr("name", "Fred")
    
      // Apply a transform function on the attribute value, or return an Empty:
      val pageSize = S.attr("count", _.toInt) openOr 20
    
      // There are also prefixed versions:
      val prefixedAttr = S.attr("prefix", "name") openOr "Not found"
    

    Note that this uses the data held in S.attrs, which means that it will find attributes through the entire snippet nesting stack. For example, given the snippets:

    <lift:MyStuff.snippetA foo="bar">
      <lift.MyStuff.snippetB>...</lift.MyStuff.snippetB>
    </lift:MyStuff.snippetA>
    

    Calling S.attr("foo") from snippetB will return Full("bar").

    Definition Classes
    S
  31. def attrs: List[(Either[String, (String, String)], String)]

    Permalink

    Get a list of current attributes.

    Get a list of current attributes. Each attribute item is a pair of (key,value). The key is an Either that depends on whether the attribute is prefixed or not. If the attribute is prefixed, the key is a Right((prefix, name)). If the attribute is unprefixed then the key is a Left(name). For example, the following table shows how various tag attributes would be represented:

    Snippet Tag Parsed attrs
    <lift:MySnippet testname="test" /> List((Left("testname"), "test"))
    <lift:MySnippet anchor:name="test" /> List((Right(("anchor", "name")), "test"))

    The prefixedAttrsToMap method provides a convenient way to retrieve only attributes with a given prefix. The prefixedAttrsToMetaData method can be used to add attributes onto an XML node

    Definition Classes
    S
    See also

    # prefixedAttrsToMetaData ( String, Map )

    # prefixedAttrsToMetaData ( String )

    # prefixedAttrsToMap ( String, Map )

    # prefixedAttrsToMap ( String )

  32. def attrsFlattenToMap: Map[String, String]

    Permalink

    Converts the S.attrs to a Map[String, String].

    Converts the S.attrs to a Map[String, String]. The key of the map depends on whether the attribute is prefixed or not. Prefixed attributes have keys of the form "prefix:name", while unprefixed attributes have keys of the form "name". If you only want attributes for a specific prefix, use prefixedAttrsToMap.

    Definition Classes
    S
    See also

    # prefixedAttrsToMap ( String, Map )

    # prefixedAttrsToMap ( String )

  33. def attrsToMetaData(predicate: (String) ⇒ Boolean): MetaData

    Permalink

    Similar to S.attrsToMetaData, but lets you specify a predicate function that filters the generated MetaData.

    Similar to S.attrsToMetaData, but lets you specify a predicate function that filters the generated MetaData. For example, if you only wanted the "id" attribute, you could do:

    val myDiv = (
    
     {...} ) % S.attrsToMetaData(_.equalsIgnoreCase("id"))
    

    predicate

    The predicate function which is executed for each attribute name. If the function returns true, then the attribute is included in the MetaData.

    Definition Classes
    S
    See also

    # attrsToMetaData

  34. def attrsToMetaData: MetaData

    Permalink

    Converts S.attrs attributes to a MetaData object that can be used to add attributes to one or more XML elements.

    Converts S.attrs attributes to a MetaData object that can be used to add attributes to one or more XML elements. Similar to prefixedAttrsToMetaData, except that it handles both prefixed and unprefixed attributes. This version of the method will use all of the currently set attributes from S.attrs. If you want to filter it, use the attrsToMetaData(String => Boolean) version, which allows you to specify a predicate function for filtering. For example, if you want all of the current attributes to be added to a div tag, you could do:

    val myDiv = (
    
     {...} ) % S.attrsToMetaData
    

    returns

    a MetaData instance representing all attributes in S.attrs

    Definition Classes
    S
    See also

    # attrsToMetaData ( String = > Boolean )

  35. def callOnce[T](f: ⇒ T): T

    Permalink

    If you bind functions (i.e.

    If you bind functions (i.e. using SHtml helpers) inside the closure passed to callOnce, after your function is invoked, it will be automatically removed from functions cache so that it cannot be invoked again.

    Definition Classes
    S
  36. lazy val chromeVersion: Box[Double]

    Permalink
    Definition Classes
    UserAgentCalculator
  37. def clearAttrs[T](f: ⇒ T): T

    Permalink

    Sometimes, in the course of eager evaluation, it becomes necessary to clear attribtues so they do not polute the eagerly evaluated stuff.

    Sometimes, in the course of eager evaluation, it becomes necessary to clear attribtues so they do not polute the eagerly evaluated stuff. When you need to clear the attributes, wrap your code block in clearAttrs and have fun.

    T

    the return type of the code block

    f

    the call-by-name code block to run where the attributes are clear

    returns

    the return value of the code block

    Definition Classes
    S
  38. def clearCurrentNotices: Unit

    Permalink

    Clears up the notices

    Clears up the notices

    Definition Classes
    S
  39. def clearFunctionMap: Unit

    Permalink

    Clears the function map.

    Clears the function map. potentially very destuctive... use at your own risk!

    Definition Classes
    S
  40. def clearHighLevelSessionDispatcher: Box[Unit]

    Permalink

    Clears all custom dispatch functions from the current session.

    Clears all custom dispatch functions from the current session. See addHighLevelSessionDispatcher for an example of usage.

    Definition Classes
    S
    See also

    # clearHighLevelSessionDispatcher

    # addHighLevelSessionDispatcher

    LiftRules.dispatch

    LiftRules.DispatchPF

  41. def clearSessionRewriter: Box[Unit]

    Permalink

    Clears the per-session rewrite table.

    Clears the per-session rewrite table. See addSessionRewriter for an example of usage.

    Definition Classes
    S
    See also

    # removeSessionRewriter

    # addSessionRewriter

    LiftRules.rewrite

  42. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def containerRequest: Box[HTTPRequest]

    Permalink

    The current container request

    The current container request

    Definition Classes
    S
  44. def containerSession: Box[HTTPSession]

    Permalink

    Returns the HttpSession

    Returns the HttpSession

    Definition Classes
    S
  45. def contextFuncBuilder(f: AFuncHolder): AFuncHolder

    Permalink

    Wrap an AFuncHolder with the current snippet and Loc context so that for Ajax calls, the original snippets, RequestVars and Loc (location) are populated

    Wrap an AFuncHolder with the current snippet and Loc context so that for Ajax calls, the original snippets, RequestVars and Loc (location) are populated

    f

    the AFuncHolder that you want to wrap with execution context

    Definition Classes
    S
  46. def contextPath: String

    Permalink

    The current context path for the deployment.

    The current context path for the deployment.

    Definition Classes
    S
  47. def cookieValue(name: String): Box[String]

    Permalink

    Get the cookie value for the given cookie

    Get the cookie value for the given cookie

    Definition Classes
    S
  48. def createJsonFunc(name: Box[String], onError: Box[JsCmd], pfp: PFPromoter[JValue, JsCmd]): (JsonCall, JsCmd)

    Permalink

    Build a handler for incoming JSON commands based on the new Json Parser.

    Build a handler for incoming JSON commands based on the new Json Parser. You can use the helpful Extractor in net.liftweb.util.JsonCommand

    name

    -- the optional name of the command (placed in a comment for testing)

    onError

    -- the JavaScript to execute client-side if the request is not processed by the server

    returns

    ( JsonCall, JsCmd )

    Definition Classes
    S
  49. def createJsonFunc(onError: JsCmd, f: PFPromoter[JValue, JsCmd]): (JsonCall, JsCmd)

    Permalink

    Build a handler for incoming JSON commands based on the new Json Parser

    Build a handler for incoming JSON commands based on the new Json Parser

    onError

    -- the JavaScript to execute client-side if the request is not processed by the server

    f

    - partial function against a returning a JsCmds

    returns

    ( JsonCall, JsCmd )

    Definition Classes
    S
  50. def createJsonFunc(f: PFPromoter[JValue, JsCmd]): (JsonCall, JsCmd)

    Permalink

    Build a handler for incoming JSON commands based on the new Json Parser

    Build a handler for incoming JSON commands based on the new Json Parser

    f

    - partial function against a returning a JsCmds

    returns

    ( JsonCall, JsCmd )

    Definition Classes
    S
  51. object currentAttr extends AttrHelper[Box]

    Permalink

    Used to get an attribute by its name from the current snippet element.

    Used to get an attribute by its name from the current snippet element. There are several means to getting attributes:

      // Get a Box for the attribute:
      val myAttr = S.currentAttr("test") openOr "Not found"
    
      // Get an attribute or return a default value:
      val myAttr = S.currentAttr("name", "Fred")
    
      // Apply a transform function on the attribute value, or return an Empty:
      val pageSize = S.currentAttr("count", _.toInt) openOr 20
    
      // There are also prefixed versions:
      val prefixedAttr = S.currentAttr("prefix", "name") openOr "Not found"
    

    Note that this uses the data held in S.currentAttrs, which means that it will only find attributes from the current snippet element. For example, given the snippets:

    <lift:MyStuff.snippetA foo="bar">
      <lift.MyStuff.snippetB>...</lift.MyStuff.snippetB>
    </lift:MyStuff.snippetA>
    

    Calling S.currentAttr("foo") from snippetB will return Empty.

    Definition Classes
    S
  52. def currentAttrs: MetaData

    Permalink

    Retrieves the attributes from the most recently executed snippet element.

    Retrieves the attributes from the most recently executed snippet element.

    For example, given the snippets:

    <lift:MyStuff.snippetA foo="bar">
      <lift.MyStuff.snippetB>...</lift.MyStuff.snippetB>
    </lift:MyStuff.snippetA>
    

    S.currentAttrs will return Nil.

    If you want a particular attribute, the S.currentAttr helper object simplifies things considerably.

    Definition Classes
    S
  53. def currentAttrsToMetaData(predicate: (String) ⇒ Boolean): MetaData

    Permalink

    Similar to S.attrsToMetaData, but lets you specify a predicate function that filters the generated MetaData.

    Similar to S.attrsToMetaData, but lets you specify a predicate function that filters the generated MetaData. For example, if you only wanted the "id" attribute, you could do:

    val myDiv = (
    
     {...} ) % S.attrsToMetaData(_.equalsIgnoreCase("id"))
    

    predicate

    The predicate function which is executed for each attribute name. If the function returns true, then the attribute is included in the MetaData.

    Definition Classes
    S
    See also

    # attrsToMetaData

  54. def currentAttrsToMetaData: MetaData

    Permalink

    Converts S.attrs attributes to a MetaData object that can be used to add attributes to one or more XML elements.

    Converts S.attrs attributes to a MetaData object that can be used to add attributes to one or more XML elements. Similar to prefixedAttrsToMetaData, except that it handles both prefixed and unprefixed attributes. This version of the method will use all of the currently set attributes from S.attrs. If you want to filter it, use the currentAttrsToMetaData(String => Boolean) version, which allows you to specify a predicate function for filtering. For example, if you want all of the current attributes to be added to a div tag, you could do:

    val myDiv = (
    
     {...} ) % S.attrsToMetaData
    

    returns

    a MetaData instance representing all attributes in S.attrs

    Definition Classes
    S
    See also

    # attrsToMetaData ( String = > Boolean )

  55. def currentCometActor: Box[LiftCometActor]

    Permalink
    Definition Classes
    S
  56. def currentSnippet: Box[String]

    Permalink
    Definition Classes
    S
  57. def currentSnippetNodeSeq: Box[NodeSeq]

    Permalink

    The current raw NodeSeq that resulted in a snippet invocation

    The current raw NodeSeq that resulted in a snippet invocation

    returns

    The current raw NodeSeq that resulted in a snippet invocation

    Definition Classes
    S
  58. def deleteCookie(name: String): Unit

    Permalink

    Deletes the cookie from the user's browser.

    Deletes the cookie from the user's browser.

    name

    the name of the cookie to delete

    Definition Classes
    S
    See also

    # deleteCookie ( Cookie )

    # addCookie ( Cookie )

    net.liftweb.http.provider.HTTPCookie

  59. def deleteCookie(cookie: HTTPCookie): Unit

    Permalink

    Deletes the cookie from the user's browser.

    Deletes the cookie from the user's browser.

    cookie

    the Cookie to delete

    Definition Classes
    S
    See also

    # deleteCookie ( String )

    # addCookie ( Cookie )

    net.liftweb.http.provider.HTTPCookie

  60. def disableTestFuncNames[T](f: ⇒ T): T

    Permalink
    Definition Classes
    S
  61. def disableTestFuncNames_?: Boolean

    Permalink
    Definition Classes
    S
  62. def eagerEval: (NodeSeq) ⇒ NodeSeq

    Permalink

    A function that will eagerly evaluate a template.

    A function that will eagerly evaluate a template.

    Definition Classes
    S
  63. def encodeURL(url: String): String

    Permalink

    Decorates an URL with jsessionid parameter in case cookies are disabled from the container.

    Decorates an URL with jsessionid parameter in case cookies are disabled from the container. Also it appends general purpose parameters defined by LiftRules.urlDecorate

    Definition Classes
    S
  64. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  65. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  66. def error(vi: List[FieldError]): Unit

    Permalink

    Sets an ERROR notices from a List[FieldError]

    Sets an ERROR notices from a List[FieldError]

    Definition Classes
    S
  67. def error(id: String, n: String): Unit

    Permalink

    Sets an ERROR notice as plain text and associates it with an id

    Sets an ERROR notice as plain text and associates it with an id

    Definition Classes
    S
  68. def error(id: String, n: NodeSeq): Unit

    Permalink

    Sets an ERROR notice as an XML sequence and associates it with an id

    Sets an ERROR notice as an XML sequence and associates it with an id

    Definition Classes
    S
  69. def error(n: NodeSeq): Unit

    Permalink

    Sets an ERROR notice as an XML sequence

    Sets an ERROR notice as an XML sequence

    Definition Classes
    S
  70. def error(n: String): Unit

    Permalink

    Sets an ERROR notice as a plain text

    Sets an ERROR notice as a plain text

    Definition Classes
    S
  71. def errors: List[(NodeSeq, Box[String])]

    Permalink

    Returns only ERROR notices

    Returns only ERROR notices

    Definition Classes
    S
  72. def eval(template: NodeSeq, snips: (String, (NodeSeq) ⇒ NodeSeq)*): Box[NodeSeq]

    Permalink

    Evaluate a template for snippets.

    Evaluate a template for snippets. This can be used to run a template from within some other Lift processing, such as a snippet or view.

    template

    the HTML template to run through the Snippet re-writing process

    snips

    any snippet mapping specific to this template run

    returns

    a Full Box containing the processed template, or a Failure if the template could not be found.

    Definition Classes
    S
  73. def exceptionThrown_?: Boolean

    Permalink

    Was an exception thrown during the processing of the current request?

    Was an exception thrown during the processing of the current request?

    Definition Classes
    S
  74. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  75. def findCookie(name: String): Box[HTTPCookie]

    Permalink

    Finds a cookie with the given name that was sent in the request.

    Finds a cookie with the given name that was sent in the request.

    name

    - the name of the cookie to find

    returns

    Full ( cookie ) if the cookie exists, Empty otherwise

    Definition Classes
    S
    See also

    # deleteCookie ( String )

    # deleteCookie ( Cookie )

    # addCookie ( Cookie )

    # receivedCookies

    net.liftweb.http.provider.HTTPCookie

  76. def findOrCreateComet[T <: LiftCometActor](cometName: Box[String], cometHtml: NodeSeq, cometAttributes: Map[String, String], receiveUpdatesOnPage: Boolean)(implicit cometManifest: Manifest[T]): Box[T]

    Permalink

    Find or build a comet actor of the given type T with the given configuration parameters.

    Find or build a comet actor of the given type T with the given configuration parameters. If a comet of that type with that name already exists, it is returned; otherwise, a new one of that type is created and set up, then returned.

    If receiveUpdates is true, updates to this comet will be pushed to the page currently being rendered or to the page that is currently invoking an AJAX callback. You can also separately register a comet to receive updates like this using {S.addComet}.

    Definition Classes
    S
  77. def findOrCreateComet(cometType: String, cometName: Box[String] = Empty, cometHtml: NodeSeq = NodeSeq.Empty, cometAttributes: Map[String, String] = Map.empty, receiveUpdatesOnPage: Boolean = false): Box[LiftCometActor]

    Permalink

    As with {findOrBuildComet[T]}, but specify the type as a String.

    As with {findOrBuildComet[T]}, but specify the type as a String. If the comet doesn't already exist, the comet type is first looked up via LiftRules.cometCreationFactory, and then as a class name in the comet packages designated by LiftRules.buildPackage("comet").

    If receiveUpdates is true, updates to this comet will be pushed to the page currently being rendered or to the page that is currently invoking an AJAX callback. You can also separately register a comet to receive updates like this using {S.addComet}.

    Definition Classes
    S
  78. lazy val firefoxVersion: Box[Double]

    Permalink
    Definition Classes
    UserAgentCalculator
  79. def fmapFunc[T](in: AFuncHolder)(f: (String) ⇒ T): T

    Permalink

    Maps a function with an random generated and name

    Maps a function with an random generated and name

    Definition Classes
    S
  80. def forHead(): List[Elem]

    Permalink

    Get the accumulated Elems for head

    Get the accumulated Elems for head

    Definition Classes
    S
    See also

    putInHead

  81. def formFuncName: String

    Permalink
    Definition Classes
    S
  82. def formGroup[T](group: Int)(f: ⇒ T): T

    Permalink
    Definition Classes
    S
  83. def functionLifespan[T](span: Boolean)(f: ⇒ T): T

    Permalink

    Functions that are mapped to HTML elements are, by default, garbage collected if they are not seen in the browser in the last 10 minutes (defined in LiftRules.unusedFunctionsLifeTime).

    Functions that are mapped to HTML elements are, by default, garbage collected if they are not seen in the browser in the last 10 minutes (defined in LiftRules.unusedFunctionsLifeTime). In some cases (e.g., JSON handlers), you may want to extend the lifespan of the functions to the lifespan of the session.

    span

    If true, extend the mapped function lifetime to the life of the session

    f

    A function to execute in the context of specified span

    Definition Classes
    S
    See also

    LiftRules.unusedFunctionsLifeTime

  84. def functionLifespan_?: Boolean

    Permalink

    Returns whether functions are currently extended to the lifetime of the session.

    Returns whether functions are currently extended to the lifetime of the session.

    returns

    true if mapped functions will currently last the life of the session.

    Definition Classes
    S
  85. def functionMap: Map[String, AFuncHolder]

    Permalink

    Get a map of function name bindings that are used for form and other processing.

    Get a map of function name bindings that are used for form and other processing. Using these bindings is considered advanced functionality.

    Definition Classes
    S
  86. def generateFuncName: String

    Permalink

    Standard func-name logic.

    Standard func-name logic. This is the default routine.

    Definition Classes
    S
  87. def generatePredictableFuncName: String

    Permalink

    Generates a func-name based on the location in the call-site source code.

    Generates a func-name based on the location in the call-site source code.

    Definition Classes
    S
  88. def generateTestFuncName: String

    Permalink

    Default func-name logic during test-mode.

    Default func-name logic during test-mode.

    Definition Classes
    S
  89. def get(what: String): Box[String]

    Permalink

    Returns the LiftSession parameter denominated by 'what'.

    Returns the LiftSession parameter denominated by 'what'.

    Definition Classes
    S
    See also

    # unsetSessionAttribute

    # unset

    # setSessionAttribute

    # set

    # getSessionAttribute

  90. def getAllNotices: List[(Value, NodeSeq, Box[String])]

    Permalink

    Returns the current and "old" notices

    Returns the current and "old" notices

    Definition Classes
    S
  91. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  92. def getDocType: (Boolean, Box[String])

    Permalink

    Returns the document type that was set for the response.

    Returns the document type that was set for the response. The default is XHTML 1.0 Transitional.

    Definition Classes
    S
    See also

    DocType

    setDocType

  93. def getNotices: List[(Value, NodeSeq, Box[String])]

    Permalink

    Returns the current notices

    Returns the current notices

    Definition Classes
    S
  94. def getRequestHeader(name: String): Box[String]

    Permalink

    Returns the current value of the given HTTP request header as a Box.

    Returns the current value of the given HTTP request header as a Box. This is really just a thin wrapper on Req.header(String). For response headers, see S.getHeaders, S.setHeader, or S.getHeader.

    name

    The name of the HTTP header to retrieve

    returns

    A Full(value) or Empty if the header isn't set

    Definition Classes
    S
    See also

    # getHeaders ( List[ ( String, String ) ] )

    # setHeader ( String, String )

    # getHeader ( String )

    Req # header ( String )

  95. def getResponseHeader(name: String): Box[String]

    Permalink

    Returns the current set value of the given HTTP response header as a Box.

    Returns the current set value of the given HTTP response header as a Box. If you want a request header, use Req.getHeader or S.getRequestHeader.

    name

    The name of the HTTP header to retrieve

    returns

    A Full(value) or Empty if the header isn't set

    Definition Classes
    S
    See also

    # getRequestHeader ( String )

    # getResponseHeaders ( List[ ( String, String ) ] )

    # setHeader ( String, String )

  96. def getResponseHeaders(in: List[(String, String)]): List[(String, String)]

    Permalink

    Returns the currently set HTTP response headers as a List[(String, String)].

    Returns the currently set HTTP response headers as a List[(String, String)]. To retrieve a specific response header, use S.getResponseHeader. If you want to get request headers (those sent by the client), use Req.getHeaders or S.getRequestHeader.

    Definition Classes
    S
    See also

    # getRequestHeader ( String )

    # getResponseHeader ( String )

    # setHeader ( String, String )

  97. def getSessionAttribute(what: String): Box[String]

    Permalink

    Returns the HttpSession parameter denominated by 'what'

    Returns the HttpSession parameter denominated by 'what'

    Definition Classes
    S
    See also

    # unsetSessionAttribute

    # unset

    # setSessionAttribute

    # set

    # get

  98. def get_?: Boolean

    Permalink

    Test the current request to see if it's a GET.

    Test the current request to see if it's a GET. This is a thin wrapper on Req.get_?

    returns

    true if the request is a GET, false otherwise.

    Definition Classes
    S
    See also

    Req.get_ ?

  99. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  100. def highLevelSessionDispatchList: List[DispatchHolder]

    Permalink

    Return the list of DispatchHolders set for this session.

    Return the list of DispatchHolders set for this session.

    Definition Classes
    S
    See also

    DispatchHolder

  101. def highLevelSessionDispatcher: List[DispatchPF]

    Permalink

    Return a List of the LiftRules.DispatchPF functions that are set for this session.

    Return a List of the LiftRules.DispatchPF functions that are set for this session. See addHighLevelSessionDispatcher for an example of how these are used.

    Definition Classes
    S
    See also

    # clearHighLevelSessionDispatcher

    # removeHighLevelSessionDispatcher ( String )

    # addHighLevelSessionDispatcher ( String, LiftRules.DispatchPF )

    LiftRules.DispatchPF

  102. def hostAndPath: String

    Permalink

    The host and path of the request up to and including the context path.

    The host and path of the request up to and including the context path. This does not include the template path or query string.

    Definition Classes
    S
  103. def hostName: String

    Permalink

    The hostname to which the request was sent.

    The hostname to which the request was sent. This is taken from the "Host" HTTP header, or if that does not exist, the DNS name or IP address of the server.

    Definition Classes
    S
  104. def htmlProperties: HtmlProperties

    Permalink

    Get the current instance of HtmlProperties

    Get the current instance of HtmlProperties

    Definition Classes
    S
  105. def idMessages(f: ⇒ List[(NodeSeq, Box[String])]): List[(String, List[NodeSeq])]

    Permalink

    Returns the messages that are associated with any id.

    Returns the messages that are associated with any id. Messages associated with the same id will be enlisted.

    f

    - the function that returns the messages

    Definition Classes
    S
  106. lazy val ieIE10: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  107. lazy val ieVersion: Box[Int]

    Permalink
    Definition Classes
    UserAgentCalculator
  108. def ignoreFailedSnippets: Boolean

    Permalink

    returns

    should failed snippets be ignored and have the original NodeSeq returned?

    Definition Classes
    S
  109. def inStatefulScope_?: Boolean

    Permalink

    This method returns true if the S object has been initialized for our current scope.

    This method returns true if the S object has been initialized for our current scope. If the S object has not been initialized then functionality on S will not work.

    Definition Classes
    S
  110. def init[B](request: Box[Req], session: LiftSession)(f: ⇒ B): B

    Permalink

    Initialize the current request session.

    Initialize the current request session. Generally this is handled by Lift during request processing, but this method is available in case you want to use S outside the scope of a request (standard HTTP or Comet).

    request

    The Req instance for this request

    session

    the LiftSession for this request

    f

    Function to execute within the scope of the request and session

    Definition Classes
    S
  111. def initIfUninitted[B](session: LiftSession)(f: ⇒ B): B

    Permalink

    Initialize the current request session if it's not already initialized.

    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 of a request (standard HTTP or Comet).

    session

    the LiftSession for this request

    f

    A function to execute within the scope of the session

    Definition Classes
    S
  112. def invokedAs: String

    Permalink

    Returns the 'type' S attribute.

    Returns the 'type' S attribute. This corresponds to the current Snippet's name. For example, the snippet:

      <lift:Hello.world />
    

    Will return "Hello.world".

    Definition Classes
    S
  113. def isChrome: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  114. lazy val isChrome2: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  115. lazy val isChrome3: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  116. def isChrome3_+: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  117. lazy val isChrome4: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  118. lazy val isChrome5: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  119. lazy val isChrome6: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  120. def isFirefox: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  121. lazy val isFirefox2: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  122. lazy val isFirefox3: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  123. lazy val isFirefox35: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  124. def isFirefox35_+: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  125. lazy val isFirefox36: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  126. lazy val isFirefox40: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  127. lazy val isIE: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  128. lazy val isIE11: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  129. lazy val isIE6: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  130. lazy val isIE7: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  131. lazy val isIE8: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  132. lazy val isIE9: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  133. lazy val isIPad: Boolean

    Permalink

    Is the Req coming from an iPad

    Is the Req coming from an iPad

    Definition Classes
    UserAgentCalculator
  134. lazy val isIPhone: Boolean

    Permalink

    Is the Req coming from an iPhone

    Is the Req coming from an iPhone

    Definition Classes
    UserAgentCalculator
  135. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  136. def isOpera: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  137. lazy val isOpera9: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  138. def isSafari: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  139. def isSafari2: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  140. lazy val isSafari3: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  141. def isSafari3_+: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  142. lazy val isSafari4: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  143. lazy val isSafari5: Boolean

    Permalink
    Definition Classes
    UserAgentCalculator
  144. def jsToAppend(clearAfterReading: Boolean = false): List[JsCmd]

    Permalink

    Get the accumulated JavaScript

    Get the accumulated JavaScript

    Definition Classes
    S
    See also

    appendJs

  145. def jsonFmapFunc[T](in: (JValue) ⇒ JsCmd)(f: (String) ⇒ T)(implicit dummy: AvoidTypeErasureIssues1): T

    Permalink

    Maps a function that will be called with a parsed JValue and should return a JsCmd to be sent back to the browser.

    Maps a function that will be called with a parsed JValue and should return a JsCmd to be sent back to the browser. Note that if the passed JSON does not parse, the function will not be invoked.

    Definition Classes
    S
  146. def legacyIeCompatibilityMode: Boolean

    Permalink

    A boolean indicating whether or not the response should be rendered with special accomodations for IE 6 / 7 / 8 compatibility.

    A boolean indicating whether or not the response should be rendered with special accomodations for IE 6 / 7 / 8 compatibility.

    returns

    true if this response should be rendered in IE 6/7/8 compatibility mode.

    Definition Classes
    S
    See also

    Req.isIE

    Req.isIE8

    Req.isIE7

    Req.isIE6

    LiftRules.calcIEMode

    LiftSession.legacyIeCompatibilityMode

  147. def liftCoreResourceBundle: Box[ResourceBundle]

    Permalink

    Get the lift core resource bundle for the current locale as defined by the LiftRules.liftCoreResourceName varibale.

    Get the lift core resource bundle for the current locale as defined by the LiftRules.liftCoreResourceName varibale.

    Definition Classes
    S
    See also

    LiftRules.liftCoreResourceName

  148. def loc(str: String, xform: (NodeSeq) ⇒ NodeSeq): Box[NodeSeq]

    Permalink

    Localize the incoming string based on a resource bundle for the current locale.

    Localize the incoming string based on a resource bundle for the current locale. The localized string is converted to an XML element if necessary via the LiftRules.localizeStringToXml function (the default behavior is to wrap it in a Text element). If the lookup fails for a given resource bundle (e.g. a null is returned), then the LiftRules.localizationLookupFailureNotice function is called with the input string and locale. The function is applied to the result/

    str

    the string or ID to localize

    xform

    the function that transforms the NodeSeq

    returns

    A Full box containing the localized XML or Empty if there's no way to do localization

    Definition Classes
    S
    See also

    # loc ( String, NodeSeq )

    LiftRules.localizationLookupFailureNotice

    LiftRules.localizeStringToXml

    # resourceBundles

    # locale

  149. def loc(str: String, dflt: NodeSeq): NodeSeq

    Permalink

    Localize the incoming string based on a resource bundle for the current locale, with a default value to to return if localization fails.

    Localize the incoming string based on a resource bundle for the current locale, with a default value to to return if localization fails.

    str

    the string or ID to localize

    dflt

    the default string to return if localization fails

    returns

    the localized XHTML or default value

    Definition Classes
    S
    See also

    # loc ( String )

  150. def loc(str: String): Box[NodeSeq]

    Permalink

    Localize the incoming string based on a resource bundle for the current locale.

    Localize the incoming string based on a resource bundle for the current locale. The localized string is converted to an XML element if necessary via the LiftRules.localizeStringToXml function (the default behavior is to wrap it in a Text element). If the lookup fails for a given resource bundle (e.g. a null is returned), then the LiftRules.localizationLookupFailureNotice function is called with the input string and locale.

    str

    the string or ID to localize

    returns

    A Full box containing the localized XML or Empty if there's no way to do localization

    Definition Classes
    S
    See also

    # loc ( String, NodeSeq )

    LiftRules.localizationLookupFailureNotice

    LiftRules.localizeStringToXml

    # resourceBundles

    # locale

  151. def locale: Locale

    Permalink

    Returns the Locale for this request based on the LiftRules.localeCalculator method.

    Returns the Locale for this request based on the LiftRules.localeCalculator method.

    Definition Classes
    S
    See also

    java.util.Locale

    LiftRules.localeCalculator ( HTTPRequest )

  152. def locateMappedSnippet(name: String): Box[(NodeSeq) ⇒ NodeSeq]

    Permalink
    Definition Classes
    S
  153. def locateSnippet(name: String): Box[(NodeSeq) ⇒ NodeSeq]

    Permalink

    Finds a snippet function by name.

    Finds a snippet function by name.

    Definition Classes
    S
    See also

    LiftRules.snippets

  154. def location: Box[Loc[_]]

    Permalink
    Definition Classes
    S
  155. def logQuery(query: String, time: Long): ListBuffer[(String, Long)]

    Permalink

    Log a query for the given request.

    Log a query for the given request. The query log can be tested to see if queries for the particular page rendering took too long. The query log starts empty for each new request. net.liftweb.mapper.DB.queryCollector is a method that can be used as a log function for the net.liftweb.mapper.DB.addLogFunc method to enable logging of Mapper queries. You would set it up in your bootstrap like:

    import net.liftweb.mapper.DB
    import net.liftweb.http.S
    class Boot  {
      def boot  {
        ...
        DB.addLogFunc(DB.queryCollector)
        ...
    }
    }
    

    Note that the query log is simply stored as a List and is not sent to any output by default. To retrieve the List of query log items, use S.queryLog. You can also provide your own analysis function that will process the query log via S.addAnalyzer.

    Definition Classes
    S
    See also

    net.liftweb.mapper.DB.addLogFunc

    # addAnalyzer

    # queryLog

  156. def loggedIn_?: Boolean

    Permalink

    This method is a convenience accessor for LiftRules.loggedInTest.

    This method is a convenience accessor for LiftRules.loggedInTest. You can define your own function to check to see if a user is logged in there and this will call it.

    returns

    the value from executing LiftRules.loggedInTest, or false if a test function is not defined.

    Definition Classes
    S
    See also

    LiftRules.loggedInTest

  157. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  158. def mapFuncToURI(uri: String, f: () ⇒ Unit): String

    Permalink

    Attaches to this uri and parameter that has function f associated with.

    Attaches to this uri and parameter that has function f associated with. When this request is submitted to server the function will be executed and then it is automatically cleaned up from functions caches.

    Definition Classes
    S
  159. def mapSnippet(name: String, func: (NodeSeq) ⇒ NodeSeq): Unit

    Permalink

    Associates a name with a snippet function 'func'.

    Associates a name with a snippet function 'func'. This can be used to change a snippet mapping on a per-request basis. For example, if we have a page that we want to change behavior on based on query parameters, we could use mapSnippet to programmatically determine which snippet function to use for a given snippet in the template. Our code would look like:

      import scala.xml.{ NodeSeq,Text }
      class SnipMap  {
      def topSnippet (xhtml : NodeSeq) : NodeSeq =  {
      if (S.param("showAll").isDefined)  {
      S.mapSnippet("listing", listing)
      } else  {
      S.mapSnippet("listing",  { ignore => Text("") } )
      }
    
      ...
      }
    
      def listing(xhtml : NodeSeq) : NodeSeq =  {
      ...
      }
    

    Then, your template would simply look like:

      <lift:surround with="default" at="content">
      ...
      <p><lift:SnipMap.topSnippet /></p>
      <p><lift:listing /></p>
      </lift:surround>
    

    Snippets are processed in the order that they're defined in the template, so if you want to use this approach make sure that the snippet that defines the mapping comes before the snippet that is being mapped. Also note that these mappings are per-request, and are discarded after the current request is processed.

    name

    The name of the snippet that you want to map (the part after "<lift:").

    func

    The snippet function to map to.

    Definition Classes
    S
  160. def mapSnippetsWith[T](snips: (String, (NodeSeq) ⇒ NodeSeq)*)(f: ⇒ T): T

    Permalink

    The are times when it's helpful to define snippets for a certain call stack...

    The are times when it's helpful to define snippets for a certain call stack... snippets that are local purpose. Use doWithSnippets to temporarily define snippet mappings for the life of f.

    Definition Classes
    S
  161. def mapToAttrs(in: Map[String, String]): MetaData

    Permalink

    Converts a Map[String, String] into a MetaData instance.

    Converts a Map[String, String] into a MetaData instance. This can be used to add attributes to an XML element based on a map of attribute->value pairs. See prefixedAttrsToMetaData(String,Map) for an example.

    in

    The map of attributes

    returns

    MetaData representing the Map of attributes as unprefixed attributes.

    Definition Classes
    S
    See also

    # prefixedAttrsToMetaData ( String, Map )

  162. def messages(f: ⇒ List[(NodeSeq, Box[String])]): List[NodeSeq]

    Permalink

    Returns all messages, associated with any id or not

    Returns all messages, associated with any id or not

    f

    - the function that returns the messages

    Definition Classes
    S
  163. def messagesById(id: String)(f: ⇒ List[(NodeSeq, Box[String])]): List[NodeSeq]

    Permalink

    Returns the messages provided by list function that are associated with id

    Returns the messages provided by list function that are associated with id

    id

    - the lookup id

    f

    - the function that returns the messages

    Definition Classes
    S
  164. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  165. def noIdMessages(f: ⇒ List[(NodeSeq, Box[String])]): List[NodeSeq]

    Permalink

    Returns the messages that are not associated with any id

    Returns the messages that are not associated with any id

    f

    - the function that returns the messages

    Definition Classes
    S
  166. def notice(id: String, n: String): Unit

    Permalink

    Sets a NOTICE notice as plai text and associates it with an id

    Sets a NOTICE notice as plai text and associates it with an id

    Definition Classes
    S
  167. def notice(id: String, n: NodeSeq): Unit

    Permalink

    Sets a NOTICE notice as and XML sequence and associates it with an id

    Sets a NOTICE notice as and XML sequence and associates it with an id

    Definition Classes
    S
  168. def notice(n: NodeSeq): Unit

    Permalink

    Sets a NOTICE notice as an XML sequence

    Sets a NOTICE notice as an XML sequence

    Definition Classes
    S
  169. def notice(n: String): Unit

    Permalink

    Sets a NOTICE notice as plain text

    Sets a NOTICE notice as plain text

    Definition Classes
    S
  170. def notices: List[(NodeSeq, Box[String])]

    Permalink

    Returns only NOTICE notices

    Returns only NOTICE notices

    Definition Classes
    S
  171. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  172. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  173. def oneShot[T](f: ⇒ T): T

    Permalink

    All functions created inside the oneShot scope will only be called once and their results will be cached and served again if the same function is invoked

    All functions created inside the oneShot scope will only be called once and their results will be cached and served again if the same function is invoked

    Definition Classes
    S
  174. def originalRequest: Box[Req]

    Permalink

    If this is an Ajax request, return the original request that created the page.

    If this is an Ajax request, return the original request that created the page. The original request is useful because it has the original path which is helpful for localization purposes.

    returns

    the original request or if that's not available, the current request

    Definition Classes
    S
  175. def overrideSnippetForClass(cls: String, inst: DispatchSnippet): Unit

    Permalink

    Register a stateful snippet for a given class name.

    Register a stateful snippet for a given class name. The addSnippetForClass method is preferred

    Definition Classes
    S
  176. def param(n: String): Box[String]

    Permalink

    Returns the HTTP parameter having 'n' name

    Returns the HTTP parameter having 'n' name

    Definition Classes
    SHasParams
  177. def params(n: String): List[String]

    Permalink

    Returns all the HTTP parameters having 'n' name

    Returns all the HTTP parameters having 'n' name

    Definition Classes
    S
  178. def post_?: Boolean

    Permalink

    Test the current request to see if it's a POST.

    Test the current request to see if it's a POST. This is a thin wrapper over Req.post_?

    returns

    true if the request is a POST request, false otherwise.

    Definition Classes
    S
  179. def prefixedAttrsToMap(prefix: String): Map[String, String]

    Permalink

    Returns the S attributes that are prefixed by 'prefix' parameter as a Map[String, String]

    Returns the S attributes that are prefixed by 'prefix' parameter as a Map[String, String]

    prefix

    the prefix to be matched

    returns

    Map[String, String]

    Definition Classes
    S
    See also

    # prefixedAttrsToMetaData ( String, Map )

    # prefixedAttrsToMetaData ( String )

    # prefixedAttrsToMap ( String, Map )

  180. def prefixedAttrsToMap(prefix: String, start: Map[String, String]): Map[String, String]

    Permalink

    Returns the S attributes that are prefixed by 'prefix' parameter as a Map[String, String] that will be 'merged' with the 'start' Map

    Returns the S attributes that are prefixed by 'prefix' parameter as a Map[String, String] that will be 'merged' with the 'start' Map

    prefix

    the prefix to be matched

    start

    the initial Map

    returns

    Map[String, String]

    Definition Classes
    S
    See also

    # prefixedAttrsToMetaData ( String, Map )

    # prefixedAttrsToMetaData ( String )

    # prefixedAttrsToMap ( String )

  181. def prefixedAttrsToMetaData(prefix: String): MetaData

    Permalink

    Similar with prefixedAttrsToMetaData(prefix: String, start: Map[String, String]) but there is no 'start' Map

    Similar with prefixedAttrsToMetaData(prefix: String, start: Map[String, String]) but there is no 'start' Map

    Definition Classes
    S
  182. def prefixedAttrsToMetaData(prefix: String, start: Map[String, String]): MetaData

    Permalink

    Returns the S attributes that are prefixed by 'prefix' parameter as a MetaData.

    Returns the S attributes that are prefixed by 'prefix' parameter as a MetaData. The start Map will be 'merged' with the Map resulted after prefix matching and the result Map will be converted to a MetaData. The MetaData can be used to add attributes back onto XML elements via Scala's '%' method. For example, if we wanted to add attributes prefixed with "anchor" to any <a> elements we create, we could do something like:

      val myLink = (...) % S.prefixedAttrsToMetaData("anchor", Map("id" -> "myAnchor"))
    

    prefix

    the prefix to be matched

    start

    the initial Map

    returns

    MetaData representing the combination of current attributes plus the start Map of attributes

    Definition Classes
    S
    See also

    # prefixedAttrsToMetaData ( String )

    # prefixedAttrsToMap ( String, Map )

    # prefixedAttrsToMap ( String )

  183. def putAtEndOfBody(elem: Elem): Unit

    Permalink

    Put the given Elem at the end of the body tag.

    Put the given Elem at the end of the body tag.

    Definition Classes
    S
  184. def putInHead(elem: Elem): Unit

    Permalink

    Put the given Elem in the head tag.

    Put the given Elem in the head tag. The Elems will be de-dupped so no problems adding the same style tag multiple times

    Definition Classes
    S
  185. def queryLog: List[(String, Long)]

    Permalink

    Get a list of the logged queries.

    Get a list of the logged queries. These log entries are added via the logQuery method, which has a more detailed explanation of usage.

    Definition Classes
    S
    See also

    # addAnalyzer

    # logQuery ( String, Long )

  186. def queryString: Box[String]

    Permalink

    Returns the query string for the current request

    Returns the query string for the current request

    Definition Classes
    S
  187. def receivedCookies: List[HTTPCookie]

    Permalink

    returns

    a List of any Cookies that have been set for this Response. If you want a specific cookie, use findCookie.

    Definition Classes
    S
    See also

    # deleteCookie ( String )

    # deleteCookie ( Cookie )

    # addCookie ( Cookie )

    # findCookie ( String )

    net.liftweb.http.provider.HTTPCookie

  188. def redirectTo(where: String, func: () ⇒ Unit): Nothing

    Permalink

    Redirects the browser to a given URL and registers a function that will be executed when the browser accesses the new URL.

    Redirects the browser to a given URL and registers a function that will be executed when the browser accesses the new URL. Otherwise the function is exactly the same as S.redirectTo(String), which has example documentation. Note that if the URL that you redirect to must be part of your web application or the function won't be executed. This is because the function is only registered locally.

    where

    The new URL to redirect to.

    func

    The function to be executed when the redirect is accessed.

    Definition Classes
    S
    See also

    # redirectTo ( String )

  189. def redirectTo(where: String): Nothing

    Permalink

    Redirects the browser to a given URL.

    Redirects the browser to a given URL. Note that the underlying mechanism for redirects is to throw a ResponseShortcutException, so if you're doing the redirect within a try/catch block, you need to make sure to either ignore the redirect exception or rethrow it. Two possible approaches would be:

      ...
      try  {
        // your code here
        S.redirectTo(...)
    } catch  {
        case e: Exception if !e.isInstanceOf[LiftFlowOfControlException] => ...
    }
    

    or

      ...
      try  {
        // your code here
        S.redirectTo(...)
    } catch  {
        case rse: LiftFlowOfControlException => throw rse
        case e: Exception => ...
    }
    

    where

    The new URL to redirect to.

    Definition Classes
    S
    See also

    # redirectTo ( String, ( ) => Unit)

    ResponseShortcutException

  190. def referer: Box[String]

    Permalink

    Returns the 'Referer' HTTP header attribute.

    Returns the 'Referer' HTTP header attribute.

    Definition Classes
    S
  191. def removeHighLevelSessionDispatcher(name: String): Box[HashMap[String, DispatchPF]]

    Permalink

    Removes a custom dispatch function for the current session.

    Removes a custom dispatch function for the current session. See addHighLevelSessionDispatcher for an example of usage.

    name

    The name of the custom dispatch to be removed.

    Definition Classes
    S
    See also

    # clearHighLevelSessionDispatcher

    # addHighLevelSessionDispatcher

    LiftRules.dispatch

    LiftRules.DispatchPF

  192. def removeSessionRewriter(name: String): Box[HashMap[String, RewritePF]]

    Permalink

    Removes the given per-session rewriter.

    Removes the given per-session rewriter. See addSessionRewriter for an example of usage.

    Definition Classes
    S
    See also

    # clearSessionRewriter

    # addSessionRewriter

    LiftRules.rewrite

  193. def render(xhtml: NodeSeq, httpRequest: HTTPRequest): NodeSeq

    Permalink
    Definition Classes
    S
  194. def renderVersion: String

    Permalink

    Returns the logical page_id of the current request.

    Returns the logical page_id of the current request. All RequestVars for a current page share this id.

    Definition Classes
    S
  195. def request: Box[Req]

    Permalink

    Get a Req representing our current HTTP request.

    Get a Req representing our current HTTP request.

    returns

    A Full(Req) if one has been initialized on the calling thread, Empty otherwise.

    Definition Classes
    S
    See also

    Req

  196. def resourceBundles(loc: Locale): List[ResourceBundle]

    Permalink
    Definition Classes
    S
  197. def resourceBundles: List[ResourceBundle]

    Permalink

    Get a List of the resource bundles for the current locale.

    Get a List of the resource bundles for the current locale. The resource bundles are defined by the LiftRules.resourceNames and LiftRules.resourceBundleFactories variables. If you do not define an entry for a particular key, we fall back to using Lift's core entries.

    Definition Classes
    S
    See also

    LiftRules.resourceBundleFactories

    LiftRules.resourceNames

  198. def respondAsync(f: ⇒ Box[LiftResponse]): () ⇒ Box[LiftResponse]

    Permalink

    Use this in DispatchPF for processing REST requests asynchronously.

    Use this in DispatchPF for processing REST requests asynchronously. Note that this must be called in a stateful context, therefore the S state must be a valid one.

    f

    - the user function that does the actual computation. This function takes one parameter which is the function that must be invoked for returning the actual response to the client. Note that f function is invoked asynchronously in the context of a different thread.

    Definition Classes
    S
  199. def responseCookies: List[HTTPCookie]

    Permalink

    returns

    a List of any Cookies that have been added to the response to be sent back to the user. If you want the cookies that were sent with the request, see receivedCookies.

    Definition Classes
    S
    See also

    # receivedCookies

    net.liftweb.http.provider.HTTPCookie

  200. def runExceptionHandlers(req: Req, orig: Throwable): Box[LiftResponse]

    Permalink

    Run any configured exception handlers and make sure errors in the handlers are ignored

    Run any configured exception handlers and make sure errors in the handlers are ignored

    Definition Classes
    S
  201. def runSnippetsWithIgnoreFailed[T](ignore: Boolean)(f: ⇒ T): T

    Permalink

    Set the ignore snippet error mode.

    Set the ignore snippet error mode. In this mode, any snippet failures (usually snippets not being invocable) will be ignored and the original NodeSeq will be returned.

    This is useful if you want to do an initial pass of a page with a white-list of snippets, but not run every snippet on the page.

    T

    the return type of the code block

    ignore

    sets the ignore flag

    f

    the code block to execute

    returns

    the return of the code block

    Definition Classes
    S
  202. def runTemplate(path: List[String], snips: (String, (NodeSeq) ⇒ NodeSeq)*): Box[NodeSeq]

    Permalink

    Find and process a template.

    Find and process a template. This can be used to load a template from within some other Lift processing, such as a snippet or view. If you just want to retrieve the XML contents of a template, use Templates.apply.

    path

    The path for the template that you want to process

    snips

    any snippet mapping specific to this template run

    returns

    a Full Box containing the processed template, or a Failure if the template could not be found.

    Definition Classes
    S
    See also

    TempalateFinder # apply

  203. lazy val safariVersion: Box[Int]

    Permalink
    Definition Classes
    UserAgentCalculator
  204. def seeOther[T](where: String, func: () ⇒ Unit): T

    Permalink

    Redirects the browser to a given URL and registers a function that will be executed when the browser accesses the new URL.

    Redirects the browser to a given URL and registers a function that will be executed when the browser accesses the new URL. Otherwise the function is exactly the same as S.seeOther(String), which has example documentation. Note that if the URL that you redirect to must be part of your web application or the function won't be executed. This is because the function is only registered locally.

    where

    The new URL to redirect to.

    func

    The function to be executed when the redirect is accessed.

    Definition Classes
    S
    See also

    # seeOther ( String )

  205. def seeOther[T](where: String): T

    Permalink

    Redirects the browser to a given URL.

    Redirects the browser to a given URL. Note that the underlying mechanism for redirects is to throw a ResponseShortcutException, so if you're doing the redirect within a try/catch block, you need to make sure to either ignore the redirect exception or rethrow it. Two possible approaches would be:

      ...
      try  {
        // your code here
        S.seeOther(...)
    } catch  {
        case e: Exception if !e.instanceOf[LiftFlowOfControlException] => ...
    }
    

    or

      ...
      try  {
        // your code here
        S.seeOther(...)
    } catch  {
        case rse: LiftFlowOfControlException => throw rse
        case e: Exception => ...
    }
    

    where

    The new URL to redirect to.

    Definition Classes
    S
    See also

    # seeOther ( String, ( ) => Unit)

    ResponseShortcutException

  206. def session: Box[LiftSession]

    Permalink

    The current LiftSession.

    The current LiftSession.

    Definition Classes
    S
  207. def sessionRewriter: List[RewriteHolder]

    Permalink

    Return the list of RewriteHolders set for this session.

    Return the list of RewriteHolders set for this session. See addSessionRewriter for an example of how to use per-session rewrites.

    Definition Classes
    S
    See also

    LiftRules # rewrite

    RewriteHolder

  208. def set(name: String, value: String): Unit

    Permalink

    Sets a LiftSession attribute

    Sets a LiftSession attribute

    Definition Classes
    S
    See also

    # unsetSessionAttribute

    # unset

    # setSessionAttribute

    # getSessionAttribute

    # get

  209. def setDocType(what: Box[String]): Unit

    Permalink

    Sets the document type for the response.

    Sets the document type for the response. If this is not set, the DocType for Lift responses defaults to XHTML 1.0 Transitional.

    Definition Classes
    S
    See also

    DocType

    ResponseInfo.docType

    getDocType

  210. def setHeader(name: String, value: String): Unit

    Permalink

    Sets a HTTP response header attribute.

    Sets a HTTP response header attribute. For example, you could set a "Warn" header in your response:

      ...
      S.setHeader("Warn", "The cheese is old and moldy")
      ...
    

    Definition Classes
    S
    See also

    # getHeaders

  211. def setResponseHeader(name: String, value: String): Unit

    Permalink

    Synonym for S.setHeader.

    Synonym for S.setHeader. Exists to provide the converse to S.getResponseHeader.

    Definition Classes
    S
  212. def setSessionAttribute(name: String, value: String): Unit

    Permalink

    Sets a HttpSession attribute

    Sets a HttpSession attribute

    Definition Classes
    S
    See also

    # unsetSessionAttribute

    # unset

    # set

    # getSessionAttribute

    # get

  213. def skipDocType: Boolean

    Permalink

    When this is true, Lift will not emit a DocType definition at the start of the response content.

    When this is true, Lift will not emit a DocType definition at the start of the response content. If you're sending XHTML and this is set to true, you need to include the DocType in your template.

    Definition Classes
    S
    See also

    # skipDocType_ =(Boolean)

  214. def skipDocType_=(skip: Boolean): Unit

    Permalink

    Sets Lift's DocType behavior.

    Sets Lift's DocType behavior. If this is set to true, Lift will not emit a DocType definition at the start of the response content. If you're sending XHTML and this is set to true, you need to include the DocType in your template.

    skip

    Set to true to prevent Lift from emitting a DocType in its response

    Definition Classes
    S
    See also

    # skipDocType

  215. def skipXmlHeader: Boolean

    Permalink

    If true, then the xml header at the beginning of the returned XHTML page will not be inserted.

    If true, then the xml header at the beginning of the returned XHTML page will not be inserted.

    Definition Classes
    S
  216. def skipXmlHeader_=(in: Boolean): Unit

    Permalink

    Set the skipXmlHeader flag

    Set the skipXmlHeader flag

    Definition Classes
    S
  217. def snippetForClass(cls: String): Box[DispatchSnippet]

    Permalink

    Given a snippet class name, return the cached or predefined stateful snippet for that class

    Given a snippet class name, return the cached or predefined stateful snippet for that class

    Definition Classes
    S
  218. def statefulRequest_?: Boolean

    Permalink

    Are we currently in the scope of a stateful request

    Are we currently in the scope of a stateful request

    Definition Classes
    S
  219. def statelessInit[B](request: Req)(f: ⇒ B): B

    Permalink
    Definition Classes
    S
  220. implicit def stuff2ToUnpref(in: (Symbol, Any)): UnprefixedAttribute

    Permalink
    Definition Classes
    S
  221. def synchronizeForSession[T](f: ⇒ T): T

    Permalink

    Execute code synchronized to the current session object

    Execute code synchronized to the current session object

    Definition Classes
    S
  222. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  223. def templateFromTemplateAttr: Box[NodeSeq]

    Permalink

    Find a template based on the snippet attribute "template"

    Find a template based on the snippet attribute "template"

    Definition Classes
    S
  224. def timeZone: TimeZone

    Permalink

    Return the current timezone based on the LiftRules.timeZoneCalculator method.

    Return the current timezone based on the LiftRules.timeZoneCalculator method.

    Definition Classes
    S
    See also

    java.util.TimeZone

    LiftRules.timeZoneCalculator ( HTTPRequest )

  225. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  226. implicit def tuple2FieldError(t: (FieldIdentifier, NodeSeq)): FieldError

    Permalink
    Definition Classes
    S
  227. def unset(name: String): Unit

    Permalink

    Removes a LiftSession attribute

    Removes a LiftSession attribute

    Definition Classes
    S
    See also

    # unsetSessionAttribute

    # setSessionAttribute

    # set

    # getSessionAttribute

    # get

  228. def unsetSessionAttribute(name: String): Unit

    Permalink

    Removes a HttpSession attribute

    Removes a HttpSession attribute

    Definition Classes
    S
    See also

    # unset

    # setSessionAttribute

    # set

    # getSessionAttribute

    # get

  229. def uri: String

    Permalink

    The URI of the current request (not re-written).

    The URI of the current request (not re-written). The URI is the portion of the request URL after the context path. For example, with a context path of "myApp", Lift would return the following URIs for the given requests:

    HTTP requestURI
    http://foo.com/myApp/foo/bar.html/foo/bar.html
    http://foo.com/myApp/test//test/
    http://foo.com/myApp/item.html?id=42/item.html
    If you want the full URI, including the context path, you should retrieve it from the underlying HTTPRequest. You could do something like:
      val fullURI = S.request.map(_.request.getRequestURI) openOr ("Undefined")
    
    The URI may be used to provide a link back to the same page as the current request:
      bind(...,
           "selflink" -> SHtml.link(S.uri,  { () => ... }, Text("Self link")),
           ...)
    

    Definition Classes
    S
    See also

    net.liftweb.http.provider.HTTPRequest.uri

    Req.uri

  230. def uriAndQueryString: Box[String]

    Permalink
    Definition Classes
    S
  231. def userAgent: Box[String]

    Permalink

    The user agent of the current request, if any.

    The user agent of the current request, if any.

    Definition Classes
    SUserAgentCalculator
  232. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  233. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  234. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  235. def warning(id: String, n: String): Unit

    Permalink

    Sets a WARNING notice as plain text and associates it with an id

    Sets a WARNING notice as plain text and associates it with an id

    Definition Classes
    S
  236. def warning(id: String, n: NodeSeq): Unit

    Permalink

    Sets a WARNING notice as an XML sequence and associates it with an id

    Sets a WARNING notice as an XML sequence and associates it with an id

    Definition Classes
    S
  237. def warning(n: NodeSeq): Unit

    Permalink

    Sets a WARNING notice as an XML sequence

    Sets a WARNING notice as an XML sequence

    Definition Classes
    S
  238. def warning(n: String): Unit

    Permalink

    Sets a WARNING notice as plain text

    Sets a WARNING notice as plain text

    Definition Classes
    S
  239. def warnings: List[(NodeSeq, Box[String])]

    Permalink

    Returns only WARNING notices

    Returns only WARNING notices

    Definition Classes
    S
  240. def withAttrs[T](attrs: MetaData)(f: ⇒ T): T

    Permalink

    Temporarily adds the given attributes to the current set, then executes the given function.

    Temporarily adds the given attributes to the current set, then executes the given function.

    attrs

    The attributes to set temporarily

    Definition Classes
    S
  241. def withCurrentSnippetNodeSeq[T](ns: NodeSeq)(f: ⇒ T): T

    Permalink

    The code block is executed while setting the current raw NodeSeq for access elsewhere

    The code block is executed while setting the current raw NodeSeq for access elsewhere

    T

    the type that f returns

    ns

    the current NodeSeq

    f

    the call-by-name value to return (the code block to execute)

    returns

    the value the the expression returns

    Definition Classes
    S

Inherited from S

Inherited from UserAgentCalculator

Inherited from Loggable

Inherited from HasParams

Inherited from AnyRef

Inherited from Any

Ungrouped