Skip to content

Instantly share code, notes, and snippets.

@timperrett
Created April 22, 2009 10:45
Show Gist options
  • Save timperrett/99713 to your computer and use it in GitHub Desktop.
Save timperrett/99713 to your computer and use it in GitHub Desktop.
package com.example.snippet
import _root_.scala.xml.{NodeSeq}
import _root_.net.liftweb.util.Helpers._
import _root_.net.liftweb.http.SHtml
import _root_.net.liftweb.util.{Full,Box,Empty}
class HelloWorld {
var sex = "M"
val sex_map = Map("Male"->"M", "Female"->"F")
val radios = SHtml.radio(sex_map.keys.toList, Full(sex), sex = _)
def example(xhtml: NodeSeq): NodeSeq = bind("entry", xhtml,
"male" -> radios(0),
"female" -> radios(1)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment