diff tests/crud1.ur @ 341:389399d65331

Crud update form
author Adam Chlipala <adamc@hcoop.net>
date Sun, 14 Sep 2008 19:03:55 -0400
parents 075b36dbb1a4
children 58eeeb3cbf40
line wrap: on
line diff
--- a/tests/crud1.ur	Sun Sep 14 15:20:53 2008 -0400
+++ b/tests/crud1.ur	Sun Sep 14 19:03:55 2008 -0400
@@ -17,6 +17,7 @@
                         Nam = "A",
                         Show = txt _,
                         Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
+                        WidgetPopulated = fn (nm :: Name) n => <lform><textbox{nm} value={show _ n}/></lform>,
                         Parse = readError _,
                         Inject = sql_int
                     },
@@ -24,6 +25,7 @@
                         Nam = "B",
                         Show = txt _,
                         Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
+                        WidgetPopulated = fn (nm :: Name) s => <lform><textbox{nm} value={s}/></lform>,
                         Parse = readError _,
                         Inject = sql_string
                     },
@@ -31,6 +33,7 @@
                         Nam = "C",
                         Show = txt _,
                         Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
+                        WidgetPopulated = fn (nm :: Name) n => <lform><textbox{nm} value={show _ n}/></lform>,
                         Parse = readError _,
                         Inject = sql_float
                     },
@@ -38,6 +41,7 @@
                         Nam = "D",
                         Show = txt _,
                         Widget = fn nm :: Name => <lform><textbox{nm}/></lform>,
+                        WidgetPopulated = fn (nm :: Name) b => <lform><textbox{nm} value={show _ b}/></lform>,
                         Parse = readError _,
                         Inject = sql_bool
                     }