Object

net.liftweb.builtin.snippet

Msg

Related Doc: package snippet

Permalink

object Msg extends DispatchSnippet

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:

  <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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Msg
  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
    MsgDispatchSnippet
  7. def effects(id: String): NodeSeq

    Permalink

    This method produces and appends a script element to lift's page script to render effects on a element with the given id.

    This method produces and appends a script element to lift's page script to render effects on a element with the given id.

    See also

    net.liftweb.builtin.snippet.Msgs#effects[T](Box[NoticeType.Value],String,T,Box[JsCmd => T])

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

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

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

    Permalink

    This method performs extraction of the CSS class attributes as well as rendering of any messages for the given id.

  18. def renderIdMsgs(id: String): NodeSeq

    Permalink

    This method renders the <span/> for a given id's notices, along with any effects configured for the id.

    This method renders the <span/> for a given id's notices, along with any effects configured for the id.

    See also

    net.liftweb.http.LiftRules#noticesEffects

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

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

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

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

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

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

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

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

Inherited from DispatchSnippet

Inherited from AnyRef

Inherited from Any

Ungrouped