comparison demo/crud3.ur @ 781:c884a42599f3

crud3 demo
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 May 2009 16:00:43 -0400
parents
children 669ac5e9a69e
comparison
equal deleted inserted replaced
780:0084af7af35a 781:c884a42599f3
1 table t : {Id : int, Text : string}
2 PRIMARY KEY Id
3
4 open Crud.Make(struct
5 val tab = t
6
7 val title = "Crud3"
8
9 val cols = {Text = {Nam = "Text",
10 Show = txt,
11 Widget = (fn (nm :: Name) => <xml>
12 <subform{nm}>
13 <textbox{#A}/>
14 <textbox{#B}/>
15 </subform>
16 </xml>),
17 WidgetPopulated = (fn (nm :: Name) s => <xml>
18 <subform{nm}>
19 <textbox{#A} value={s}/>
20 <textbox{#B}/>
21 </subform>
22 </xml>),
23 Parse = (fn p => p.A ^ p.B),
24 Inject = _
25 }
26 }
27 end)