Package

net.liftweb.builtin

snippet

Permalink

package snippet

Visibility
  1. Public
  2. All

Type Members

  1. case class AjaxMessageMeta(title: NodeSeq, cssClasses: Box[String]) extends Product with Serializable

    Permalink

    This case class is used to hold formatting data for the notice groups so that AJAX and static notices render consistently.

  2. abstract class CometFailureException extends SnippetFailureException

    Permalink
  3. class CometNotFoundException extends CometFailureException

    Permalink
  4. class CometTimeoutException extends CometFailureException

    Permalink

Value Members

  1. object CSS extends DispatchSnippet

    Permalink

    Display Blueprint CSS headers

  2. object Children extends DispatchSnippet

    Permalink
  3. object Comet extends DispatchSnippet with LazyLoggable

    Permalink
  4. object Embed extends DispatchSnippet

    Permalink

    This object implements the logic for the <lift:embed> tag.

    This object implements the logic for the <lift:embed> tag. It supports retrieving a template based on the "what" attribute, and any <lift:bind-at> tags contained in the embed tag will be used to replace <lift:bind> tags within the embedded template.

  5. object Form extends DispatchSnippet

    Permalink

    This object is the default handler for the <lift:form> tag, which is used to perform AJAX submission of form contents.

    This object is the default handler for the <lift:form> tag, which is used to perform AJAX submission of form contents. If the "onsubmit" attribute is set on this tag, then the contents there will be run prior to the actual AJAX call. If a "postsubmit" attribute is present on the tag, then its contents will be executed after successful submission of the form.

  6. object HTML5 extends DispatchSnippet

    Permalink

    Sets the DocType to html5

  7. object Head extends DispatchSnippet

    Permalink

    The 'head' snippet.

    The 'head' snippet. Use this snippet to move a chunk of

  8. object Ignore extends DispatchSnippet

    Permalink
  9. object LazyLoad extends DispatchSnippet

    Permalink

    Enclose your snippet tags on your template with LazyLoad and the snippet will execute on a different thread, which avoids blocking the page render.

  10. object Loc extends DispatchSnippet

    Permalink

    The Loc snippet is used to render localized content.

    The Loc snippet is used to render localized content.

    Lookup resource with the id specified with the locid attribute. Will also try to use the render method or the snippet body as locid if not specified.

    So these are equivalent:

    <lift:Loc locid="myid"/> <lift.Loc.myid/> <lift:Loc>myid</lift:Loc>

    There's a special case with the "i" method. It will use the text content as the locid, and will replace the child node with the localized content instead of the current element.

    This is especially useful together with designer friendly snippet markup:

    Some header

    If the locid "Some header" for the current locale is e.g "En overskrift", this will render

    En overskrift

    If the locid is not found, it will just render

    Some header

  11. object Menu extends DispatchSnippet

    Permalink

    This built-in snippet can be used to render a menu representing your SiteMap.

    This built-in snippet can be used to render a menu representing your SiteMap. There are three main snippet methods that you can use:

    • builder - Renders the entire SiteMap, optionally expanding all child menus
    • group - Renders the MenuItems corresponding to the specified group.
    • item - Renders the specific named MenuItem

    More detailed usage of each method is provided below

  12. object Msg extends DispatchSnippet

    Permalink

    This class is a built in snippet that allows rendering only notices (Errors, Warnings, Notices) that are associated with the id provided.

    This class is a built in snippet that allows rendering only notices (Errors, Warnings, Notices) that are associated with the id provided. This snippet also renders effects configured for the given id. Typically this will be used near by form fields to indicate that a certain field failed the validation. For example:

      <input type="text" value="" name="132746123548765"/><lift:msg id="user_msg"/>
    

    Additionally, you may specify additional CSS classes to be applied to each type of notice using the followin attributes:

    • errorClass
    • warningClass
    • noticeClass

      <input type="text" value="" name="132746123548765"/><lift:msg id="user_msg"
                                                           errorClass="error_class"
                                                           warningClass="warning_class"
                                                           noticeClass="notice_class"/>
    

    Notices for specific ids are set via the S.error(String,String) or S.error(String,NodeSeq) methods. Global (non-id) notices are rendered via the Msgs snippet.

    See also

    net.liftweb.http.LiftRules#noticesEffects

    net.liftweb.http.S#error(String,NodeSeq)

    net.liftweb.http.S#error(String,String)

    net.liftweb.builtin.snippet.Msgs

  13. object MsgErrorMeta extends SessionVar[HashMap[String, String]]

    Permalink

    This SessionVar holds a map of per-id CSS classes for error notices so that the AJAX and static renderers use the same formatting.

  14. object MsgNoticeMeta extends SessionVar[HashMap[String, String]]

    Permalink

    This SessionVar holds a map of per-id CSS classes for notice notices so that the AJAX and static renderers use the same formatting.

  15. object MsgWarningMeta extends SessionVar[HashMap[String, String]]

    Permalink

    This SessionVar holds a map of per-id CSS classes for warning notices so that the AJAX and static renderers use the same formatting.

  16. object Msgs extends DispatchSnippet

    Permalink

    This built in snippet renders messages (Errors, Warnings, Notices) in a div.

    This built in snippet renders messages (Errors, Warnings, Notices) in a div. Typically it is used in templates as a place holder for any messages that are not associated with an ID. Setting the attribute showAll to true will render all messages, with and without an ID. This will lead to duplicate messages if additionally the Msg built in snippet is used to show messages associated with an ID.

    E.g. (child nodes are optional)

    <lift:Msgs showAll="false">
      <lift:error_msg class="errorBox" >Error!  The details are:</lift:error_msg>
      <lift:warning_msg>Whoops, I had a problem:</lift:warning_msg>
      <lift:warning_class>warningBox</lift:warning_class>
      <lift:notice_msg>Note:</lift:notice_msg>
      <lift:notice_class>noticeBox</lift:notice_class>
    </lift:snippet>
    

    JavaScript fadeout and effects for the three types of notices (Errors, Warnings and Notices) can be configured via LiftRules.noticesAutoFadeOut and LiftRules.noticesEffects. Notices for individual elements based on id can be rendered using the <lift:msg/> tag.

    See also

    net.liftweb.http.LiftRules#noticesEffects

    net.liftweb.http.LiftRules#noticesAutoFadeOut

    net.liftweb.builtin.snippet.Msg

  17. object MsgsErrorMeta extends SessionVar[Box[AjaxMessageMeta]]

    Permalink

    This SessionVar holds formatting data for error notices so that the AJAX and static notice renderers use the same formatting.

  18. object MsgsNoticeMeta extends SessionVar[Box[AjaxMessageMeta]]

    Permalink

    This SessionVar holds formatting data for notice notices so that the AJAX and static notice renderers use the same formatting.

  19. object MsgsWarningMeta extends SessionVar[Box[AjaxMessageMeta]]

    Permalink

    This SessionVar holds formatting data for warning notices so that the AJAX and static notice renderers use the same formatting.

  20. object NoCometTypeException extends CometFailureException

    Permalink
  21. object ShowAll extends RequestVar[Boolean]

    Permalink

    This SessionVar records whether to show id-based messages in addition to non-id messages.

  22. object SkipDocType extends DispatchSnippet

    Permalink
  23. object Surround extends DispatchSnippet

    Permalink
  24. object Tail extends DispatchSnippet

    Permalink
  25. object TestCond extends DispatchSnippet

    Permalink

    Use this builtin snippet to either show or hide some html based on the user being logged in or not.

  26. object VersionInfo extends DispatchSnippet

    Permalink
  27. object WithParam extends DispatchSnippet

    Permalink

    Evaluates the body and stores it in the WithParam RequestVar map.

    Evaluates the body and stores it in the WithParam RequestVar map. This map is used in builtin.snippet.Surround to bind content to named sections. Note that the WithParam snippet is also mapped to "bind-at"

  28. object WithParamVar extends RequestVar[Map[String, NodeSeq]]

    Permalink
  29. object WithResourceId extends DispatchSnippet

    Permalink

    Adds a resource id entity for each URI in order to control browser caching.

    Adds a resource id entity for each URI in order to control browser caching. The rules of creating "unique" URI's are defined in LiftRules.attachResourceId function.

    <lift:with-resource-id>
      <link ... />
      <script ... />
    </lift:with-resource-id>
    

  30. object XmlGroup extends DispatchSnippet

    Permalink

Ungrouped