Skip to content

Instantly share code, notes, and snippets.

@tbje
Created March 29, 2010 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbje/347784 to your computer and use it in GitHub Desktop.
Save tbje/347784 to your computer and use it in GitHub Desktop.
val listFromDb : Box[List[String]]= ... should collect data from db, but throws exception ...
def render = {
listFromDb match {
case None => <p>No items.</p>
case Some(items) =>
bind(
"myComet", defaultXml,
"content" -> transforListToXhtml(list))
val listFromDb : Box[List[String]]= ... should collect data from db, but throws exception ...
override def defaultXml = <p>Something went very wrong, but we managed to show this message</p>
def render = {
listFromDb match {
case None => <p>No items.</p>
case Some(items) =>
bind(
"myComet", defaultXml,
"content" -> transforListToXhtml(list))
val listFromDb : Box[List[String]]= ... should collect data from db, but throws exception ...
override def defaultXml = <p>Something went very wrong, but we managed to show this message</p>
def render = {
listFromDb match {
case None => <p>No items.</p>
case Some(items) =>
bind(
"myComet", super.defaultXml,
"content" -> transforListToXhtml(list))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment