Lift
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._import scala.xml._
AJAX Form
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" -> event.name, "description" -> event.description)).toSeq)
net.liftweb.util.Helpers.