Mercurial > urweb
comparison tests/megaform.ur @ 760:21f6d2e65685
Megaform test
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 30 Apr 2009 14:43:55 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
759:67cd8326f743 | 760:21f6d2e65685 |
---|---|
1 fun handler'' ls = | |
2 case ls of | |
3 Nil => <xml/> | |
4 | Cons (r, ls) => <xml><li>{[r.C]}</li>{handler'' ls}</xml> | |
5 | |
6 fun handler' ls = | |
7 case ls of | |
8 Nil => <xml/> | |
9 | Cons (r, ls) => <xml><li>{[r.Sub.A]} <ul>{handler'' r.Sub.Sub2}</ul></li>{handler' ls}</xml> | |
10 | |
11 fun handler r = return <xml><body> | |
12 {[r.A]} | |
13 <ul>{handler' r.Sub}</ul> | |
14 {[r.C]}<br/> | |
15 {[r.Sub2.A]}<br/> | |
16 {handler'' r.Sub2.Nested} | |
17 </body></xml> | |
18 | |
19 fun main () = return <xml><body> | |
20 <form> | |
21 <textbox{#A}/><br/> | |
22 <subforms{#Sub}> | |
23 <entry> | |
24 <subform{#Sub}> | |
25 <textbox{#A}/><br/> | |
26 <subforms{#Sub2}> | |
27 <entry> | |
28 <textbox{#C}/><br/> | |
29 </entry> | |
30 | |
31 <entry> | |
32 <textbox{#C}/><br/> | |
33 </entry> | |
34 </subforms> | |
35 </subform> | |
36 </entry> | |
37 | |
38 <entry> | |
39 <subform{#Sub}> | |
40 <textbox{#A}/><br/> | |
41 <subforms{#Sub2}> | |
42 <entry> | |
43 <textbox{#C}/><br/> | |
44 </entry> | |
45 | |
46 <entry> | |
47 <textbox{#C}/><br/> | |
48 </entry> | |
49 </subforms> | |
50 </subform> | |
51 </entry> | |
52 </subforms> | |
53 <textbox{#C}/><br/> | |
54 | |
55 <subform{#Sub2}> | |
56 <textbox{#A}/><br/> | |
57 | |
58 <subforms{#Nested}> | |
59 <entry> | |
60 <textbox{#C}/> | |
61 </entry> | |
62 </subforms> | |
63 </subform><br/> | |
64 | |
65 <submit action={handler}/> | |
66 </form> | |
67 </body></xml> |