Mercurial > urweb
diff tests/radio.ur @ 1692:a1a1d66aebac
Change <radio> to yield [option string]
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 10 Mar 2012 12:53:33 -0500 |
parents | 71bafe66dbe1 |
children |
line wrap: on
line diff
--- a/tests/radio.ur Sat Mar 03 16:41:20 2012 -0500 +++ b/tests/radio.ur Sat Mar 10 12:53:33 2012 -0500 @@ -1,13 +1,15 @@ -val handler = fn x => <html><body> - You entered: {cdata x.A} -</body></html> +fun handler x = return <xml><body> + You entered: {[case x.A of + None => "nothing at all" + | Some v => v]} +</body></xml> -val main = fn () => <html><body> - <lform> - <radio{#A}> - <li> <radioOption value="A"/>A</li> - <li> <radioOption value="B"/>B</li> - </radio> - <submit action={handler}/> - </lform> -</body></html> +fun main () = return <xml><body> + <form> + <radio{#A}> + <li><radioOption value="A"/>A</li> + <li><radioOption value="B"/>B</li> + </radio> + <submit action={handler}/> + </form> +</body></xml>