Object

net.liftweb.builtin.snippet

Msgs

Related Doc: package snippet

Permalink

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
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Msgs
  2. DispatchSnippet
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

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

    Permalink
    Definition Classes
    DispatchSnippet

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

    Permalink

    This method produces and appends a script element to lift's page script to apply effects to the given notice type.

    This method produces and appends a script element to lift's page script to apply effects to the given notice type.

    See also

    net.liftweb.http.LiftRules.noticesEffects

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

    Permalink

    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

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

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

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

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

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

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

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

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

    Permalink

    This method produces and appends a script element to lift's page script to fade out the given notice type.

    This method produces and appends a script element to lift's page script to fade out the given notice type.

    See also

    net.liftweb.http.LiftRules.noticesAutoFadeOut

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

    Permalink

    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

  18. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  20. def render(styles: NodeSeq): NodeSeq

    Permalink

    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()

  21. def renderNotices(): NodeSeq

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from DispatchSnippet

Inherited from AnyRef

Inherited from Any

Ungrouped