view tests/subforms.ur @ 758:8323c1beef2e

Subforms type-checks; lists urlified and unurlified
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 11:48:56 -0400
parents
children 67cd8326f743
line wrap: on
line source
fun handler' ls =
    case ls of
        Nil => <xml/>
      | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml>

fun handler r = return <xml><body>
  {[r.A]}, {handler' r.Sub}, {[r.C]}
</body></xml>

fun main () = return <xml><body>
  <form>
    <textbox{#A}/><br/>
    <subforms{#Sub}>
      <entry>
        <textbox{#A}/><br/>
        <textbox{#B}/><br/>
        <textbox{#Sub}/><br/>
      </entry>
    </subforms>
    <textbox{#C}/><br/>
    <submit action={handler}/>
  </form>
</body></xml>