diff select.ur @ 1:4d8165e8f89a

Some help with building forms
author Adam Chlipala <adam@chlipala.net>
date Thu, 06 Jan 2011 16:45:47 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/select.ur	Thu Jan 06 16:45:47 2011 -0500
@@ -0,0 +1,9 @@
+fun crender r =
+    <xml><cselect source={r.Selected}>
+      {List.mapX (fn r' => <xml><coption value={r'.Key}>{[r'.Display]}</coption></xml>) r.Choices}
+    </cselect></xml>
+
+fun crender' r =
+    <xml><cselect source={r.Selected}>
+      {List.mapX (fn s => <xml><coption>{[s]}</coption></xml>) r.Choices}
+    </cselect></xml>