Mercurial > urweb
annotate tests/crud.urs @ 672:df6eb58de040
Fix some AJAX annoyances
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 24 Mar 2009 15:05:28 -0400 |
parents | 782ef3ad8c28 |
children | 1fb318c17546 |
rev | line source |
---|---|
adamc@352 | 1 con colMeta = fn t_formT :: (Type * Type) => |
adamc@352 | 2 {Nam : string, |
adamc@352 | 3 Show : t_formT.1 -> xbody, |
adamc@352 | 4 Widget : nm :: Name -> xml form [] [nm = t_formT.2], |
adamc@352 | 5 WidgetPopulated : nm :: Name -> t_formT.1 |
adamc@371 | 6 -> xml form [] [nm = t_formT.2], |
adamc@352 | 7 Parse : t_formT.2 -> t_formT.1, |
adamc@352 | 8 Inject : sql_injectable t_formT.1} |
adamc@346 | 9 con colsMeta = fn cols :: {(Type * Type)} => $(mapT2T colMeta cols) |
adamc@326 | 10 |
adamc@362 | 11 val int : string -> colMeta (int, string) |
adamc@362 | 12 val float : string -> colMeta (float, string) |
adamc@362 | 13 val string : string -> colMeta (string, string) |
adamc@362 | 14 val bool : string -> colMeta (bool, bool) |
adamc@362 | 15 |
adamc@325 | 16 functor Make(M : sig |
adamc@352 | 17 con cols :: {(Type * Type)} |
adamc@352 | 18 constraint [Id] ~ cols |
adamc@352 | 19 val tab : sql_table ([Id = int] ++ mapT2T fstTT cols) |
adamc@325 | 20 |
adamc@352 | 21 val title : string |
adamc@325 | 22 |
adamc@352 | 23 val cols : colsMeta cols |
adamc@352 | 24 end) : sig |
adamc@352 | 25 val main : unit -> transaction page |
adamc@325 | 26 end |