Mercurial > urweb
comparison demo/more/grid.urs @ 915:5e8b6fa5b48f
Start 'more' demo with dbgrid
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 08 Sep 2009 07:48:57 -0400 |
parents | |
children | 2422360c78a3 |
comparison
equal
deleted
inserted
replaced
914:782f0b4eea67 | 915:5e8b6fa5b48f |
---|---|
1 con colMeta' = fn (row :: Type) (t :: Type) => | |
2 {Header : string, | |
3 Project : row -> transaction t, | |
4 Update : row -> t -> transaction row, | |
5 Display : t -> xbody, | |
6 Edit : t -> xbody, | |
7 Validate : t -> signal bool} | |
8 | |
9 con colMeta = fn (row :: Type) (global_t :: (Type * Type)) => | |
10 {Initialize : transaction global_t.1, | |
11 Handlers : global_t.1 -> colMeta' row global_t.2} | |
12 | |
13 functor Make(M : sig | |
14 type row | |
15 val list : transaction (list row) | |
16 val new : transaction row | |
17 val save : {Old : row, New : row} -> transaction unit | |
18 val delete : row -> transaction unit | |
19 | |
20 con cols :: {(Type * Type)} | |
21 val cols : $(map (colMeta row) cols) | |
22 | |
23 val folder : folder cols | |
24 end) : sig | |
25 type grid | |
26 | |
27 val grid : transaction grid | |
28 val sync : grid -> transaction unit | |
29 val render : grid -> xbody | |
30 | |
31 style tabl | |
32 style tr | |
33 style th | |
34 style td | |
35 end |