Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
340:5ccb1c6412e4 | 341:389399d65331 |
---|---|
15 val cols = { | 15 val cols = { |
16 A = { | 16 A = { |
17 Nam = "A", | 17 Nam = "A", |
18 Show = txt _, | 18 Show = txt _, |
19 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, | 19 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, |
20 WidgetPopulated = fn (nm :: Name) n => <lform><textbox{nm} value={show _ n}/></lform>, | |
20 Parse = readError _, | 21 Parse = readError _, |
21 Inject = sql_int | 22 Inject = sql_int |
22 }, | 23 }, |
23 B = { | 24 B = { |
24 Nam = "B", | 25 Nam = "B", |
25 Show = txt _, | 26 Show = txt _, |
26 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, | 27 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, |
28 WidgetPopulated = fn (nm :: Name) s => <lform><textbox{nm} value={s}/></lform>, | |
27 Parse = readError _, | 29 Parse = readError _, |
28 Inject = sql_string | 30 Inject = sql_string |
29 }, | 31 }, |
30 C = { | 32 C = { |
31 Nam = "C", | 33 Nam = "C", |
32 Show = txt _, | 34 Show = txt _, |
33 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, | 35 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, |
36 WidgetPopulated = fn (nm :: Name) n => <lform><textbox{nm} value={show _ n}/></lform>, | |
34 Parse = readError _, | 37 Parse = readError _, |
35 Inject = sql_float | 38 Inject = sql_float |
36 }, | 39 }, |
37 D = { | 40 D = { |
38 Nam = "D", | 41 Nam = "D", |
39 Show = txt _, | 42 Show = txt _, |
40 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, | 43 Widget = fn nm :: Name => <lform><textbox{nm}/></lform>, |
44 WidgetPopulated = fn (nm :: Name) b => <lform><textbox{nm} value={show _ b}/></lform>, | |
41 Parse = readError _, | 45 Parse = readError _, |
42 Inject = sql_bool | 46 Inject = sql_bool |
43 } | 47 } |
44 } | 48 } |
45 end) | 49 end) |