diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-10-12 10:04:17 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-10-12 10:04:17 -0400 |
commit | e1f7d4b65f8c2c190c901d364db5e0c84474e00d (patch) | |
tree | 1b55fe22075316de0dc2872678cd45c0646fc3b7 /tests | |
parent | 9bd2b016ef2eedf73d2d00d22c009b0d3a8558d3 (diff) |
First sort-of-working run of urweb-mode
Diffstat (limited to 'tests')
-rw-r--r-- | tests/crud1.ur | 72 |
1 files changed, 33 insertions, 39 deletions
diff --git a/tests/crud1.ur b/tests/crud1.ur index cca71aab..6a7e38de 100644 --- a/tests/crud1.ur +++ b/tests/crud1.ur @@ -1,42 +1,36 @@ table t1 : {Id : int, A : int, B : string, C : float, D : bool} open Crud.Make(struct - val tab = t1 - - val title = "Crud1" - - val cols = { - A = { - 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 = _ - }, - B = { - 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 = _ - }, - C = { - 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 = _ - }, - D = { - Nam = "D", - Show = txt _, - Widget = fn nm :: Name => <lform><checkbox{nm}/></lform>, - WidgetPopulated = fn (nm :: Name) b => <lform><checkbox{nm} checked={b}/></lform>, - Parse = fn x => x, - Inject = _ - } - } -end) + val tab = t1 + + val title = "Crud1" + + val cols = { + A = {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 = _}, + B = {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 = _ + }, + C = {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 = _ + }, + D = {Nam = "D", + Show = txt _, + Widget = fn nm :: Name => <lform><checkbox{nm}/></lform>, + WidgetPopulated = fn (nm :: Name) b => <lform><checkbox{nm} checked={b}/></lform>, + Parse = fn x => x, + Inject = _} + } + end) |