Created
April 22, 2009 10:45
-
-
Save timperrett/99713 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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