summaryrefslogtreecommitdiff
path: root/tests/dynList.ur
blob: 09b3ee4c8adf50523fb17140ec1d1f7c9cf4a730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fun main () =
    b <- source True;
    let
        fun textboxList xs = <xml>
          <table>
            {List.mapX (fn src => <xml><tr>
              <td dynClass={return null} dynStyle={b <- signal b;
                                                   if b then
                                                       return (STYLE "width: 500px")
                                                   else
                                                       return (STYLE "width: 100px")}>
                <ctextbox source={src}/>
            </td></tr></xml>) xs}
          </table>
        </xml>
    in
        s <- source "foo";
        return <xml><body>
          <ccheckbox source={b}/>
          {textboxList (s :: s :: [])}
        </body></xml>
    end