comparison tests/subforms.ur @ 759:67cd8326f743

subforms working
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 13:47:46 -0400
parents 8323c1beef2e
children 16b34dc2e29c
comparison
equal deleted inserted replaced
758:8323c1beef2e 759:67cd8326f743
2 case ls of 2 case ls of
3 Nil => <xml/> 3 Nil => <xml/>
4 | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml> 4 | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml>
5 5
6 fun handler r = return <xml><body> 6 fun handler r = return <xml><body>
7 {[r.A]}, {handler' r.Sub}, {[r.C]} 7 {[r.A]}<br/>
8 {handler' r.Sub}
9 {[r.C]}
8 </body></xml> 10 </body></xml>
9 11
10 fun main () = return <xml><body> 12 fun main () = return <xml><body>
11 <form> 13 <form>
12 <textbox{#A}/><br/> 14 <textbox{#A}/><br/>
14 <entry> 16 <entry>
15 <textbox{#A}/><br/> 17 <textbox{#A}/><br/>
16 <textbox{#B}/><br/> 18 <textbox{#B}/><br/>
17 <textbox{#Sub}/><br/> 19 <textbox{#Sub}/><br/>
18 </entry> 20 </entry>
21
22 <entry>
23 <textbox{#A}/><br/>
24 <textbox{#B}/><br/>
25 <textbox{#Sub}/><br/>
26 </entry>
19 </subforms> 27 </subforms>
20 <textbox{#C}/><br/> 28 <textbox{#C}/><br/>
21 <submit action={handler}/> 29 <submit action={handler}/>
22 </form> 30 </form>
23 </body></xml> 31 </body></xml>