net.liftweb.builtin.snippet

Msgs

object Msgs extends DispatchSnippet

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

Linear Supertypes
DispatchSnippet, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Msgs
  2. DispatchSnippet
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Type Members

  1. type DispatchIt = PartialFunction[String, (NodeSeq) ⇒ NodeSeq]

    Definition Classes
    DispatchSnippet

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def dispatch: DispatchIt

    Definition Classes
    MsgsDispatchSnippet
  9. def effects(noticeType: Value): NodeSeq

    This method produces an appropriate <script> tag to apply effects to the given notice type.

    This method produces an appropriate <script> tag to apply effects to the given notice type.

    See also

    net.liftweb.http.LiftRules.noticesEffects

  10. def effects[T](noticeType: Box[Value], id: String, default: T, wrap: (JsCmd) ⇒ T): T

    This method produces appropriate JavaScript to apply effects to the given notice type.

    This method produces appropriate JavaScript to apply effects to the given notice type. The caller must provide a default value for cases where effects are not configured, as well as a wrapping function to transform the output.

    See also

    net.liftweb.http.LiftRules.noticesEffects

  11. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def noticesFadeOut(noticeType: Value): NodeSeq

    This method produces an appropriate <script> tag to fade out the given notice type.

    This method produces an appropriate <script> tag to fade out the given notice type.

    See also

    net.liftweb.http.LiftRules.noticesAutoFadeOut

  19. def noticesFadeOut[T](noticeType: Value, default: T, wrap: (JsCmd) ⇒ T): T

    This method produces appropriate JavaScript to fade out the given notice type.

    This method produces appropriate JavaScript to fade out the given notice type. The caller must provide a default value for cases where fadeout is not configured, as well as a wrapping function to transform the output.

    See also

    net.liftweb.http.LiftRules.noticesAutoFadeOut

  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. def render(styles: NodeSeq): NodeSeq

    This method performs extraction of custom formatting and then renders the current notices.

    This method performs extraction of custom formatting and then renders the current notices.

    See also

    #renderNotices()

  23. def renderNotices(): NodeSeq

    This method renders the current notices to XHtml based on the current user-specific formatting from the <lift:Msgs> tag.

    This method renders the current notices to XHtml based on the current user-specific formatting from the <lift:Msgs> tag.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from DispatchSnippet

Inherited from AnyRef

Inherited from Any