Mercurial > urweb
diff demo/batch.ur @ 908:ed06e25c70ef
Convert to requiring explicit 'rpc' marker
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 22 Aug 2009 12:55:18 -0400 |
parents | a44daa674810 |
children | e6bc6bbd7a32 |
line wrap: on
line diff
--- a/demo/batch.ur Tue Aug 11 12:01:54 2009 -0400 +++ b/demo/batch.ur Sat Aug 22 12:55:18 2009 -0400 @@ -25,7 +25,8 @@ Nil => <xml/> | Cons ((id, a), ls) => <xml> <tr><td>{[id]}</td> <td>{[a]}</td> {if withDel then - <xml><td><button value="Delete" onclick={del id}/></td></xml> + <xml><td><button value="Delete" onclick={rpc (del id)}/> + </td></xml> else <xml/>} </tr> {show' ls} @@ -55,7 +56,7 @@ fun exec () = ls <- get batched; - doBatch ls; + rpc (doBatch ls); set batched Nil in return <xml><body> @@ -63,7 +64,7 @@ {show True lss} - <button value="Update" onclick={ls <- allRows (); set lss ls}/><br/> + <button value="Update" onclick={ls <- rpc (allRows ()); set lss ls}/><br/> <br/> <h2>Batch new rows to add</h2>