diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-03-10 12:53:33 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-03-10 12:53:33 -0500 |
commit | c910d337667b9e721da43f26c957c4580607229f (patch) | |
tree | 80047c88c770f642a6d5e73eb5c44ff3cc0828b6 /tests/radio.ur | |
parent | f10d7950cdeffcd387f638adf3bdfa32b1f3773c (diff) |
Change <radio> to yield [option string]
Diffstat (limited to 'tests/radio.ur')
-rw-r--r-- | tests/radio.ur | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/radio.ur b/tests/radio.ur index e40872f8..e44eb0b7 100644 --- a/tests/radio.ur +++ b/tests/radio.ur @@ -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> |