I published this tip on my blog (http://extremejava.tpk.com.br/
2009/11/12/customizing-liftwebs-errorwarningnotice-messages/), but,
I'll put here as a quick reference for other liftweb users: just
create a snippet named "msgs". It can be like this one:

package mypkg.snippet
class Msgs {
  def msgs(cls : String, ms : List[NodeSeq]) = ms match {
    case Nil => Nil
    case x => <div class={ cls }>{ ms.flatMap(m => <p>{ m }</p>) }</
ul>
  }
  def render(xml : NodeSeq) : NodeSeq =
    <div id={ LiftRules.noticesContainerId }>
      { msgs("msgError", noIdMessages(errors)) }
      { msgs("msgWarning", noIdMessages(warnings)) }
      { msgs("msgNotice", noIdMessages(notices)) }
    </div>
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to