Lift is one of those frameworks where I return to it and I can’t remember how to use it.  It is really good for interactive pages, but the API is really littered with a lot of stuff.

This seems to be the the standard import:

import net.liftweb.common.{Box,Full,Empty}
import net.liftweb.http.S._
import net.liftweb.http.SHtml._
import net.liftweb.util.Helpers._


Nested Templates

One way to do a list of object is to use nested templates.  The xhtml will look like this:

Here is how you can use this in a snipped.

val eventTemplate = chooseTemplate("group", "events")
val events = findEvents
val boundEvents = NodeSeq.fromSeq(events.flatMap( event =>
  bind("event", eventTemplate, "name" ->, "description" -> event.description)).toSeq)


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>