diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-03 16:00:43 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-03 16:00:43 -0400 |
commit | 011a2d458a677c5db5c2fdf0684eeecaf688d6d9 (patch) | |
tree | 102fd827152c2277b58565cbe1692e2d60cd56e9 /demo/crud3.ur | |
parent | 04f51929b9a5849e4d4a922cd62ec55e7da30d14 (diff) |
crud3 demo
Diffstat (limited to 'demo/crud3.ur')
-rw-r--r-- | demo/crud3.ur | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/demo/crud3.ur b/demo/crud3.ur new file mode 100644 index 00000000..efc6c06e --- /dev/null +++ b/demo/crud3.ur @@ -0,0 +1,27 @@ +table t : {Id : int, Text : string} + PRIMARY KEY Id + +open Crud.Make(struct + val tab = t + + val title = "Crud3" + + val cols = {Text = {Nam = "Text", + Show = txt, + Widget = (fn (nm :: Name) => <xml> + <subform{nm}> + <textbox{#A}/> + <textbox{#B}/> + </subform> + </xml>), + WidgetPopulated = (fn (nm :: Name) s => <xml> + <subform{nm}> + <textbox{#A} value={s}/> + <textbox{#B}/> + </subform> + </xml>), + Parse = (fn p => p.A ^ p.B), + Inject = _ + } + } + end) |