Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Samples / MonoRail / BinderSample / BinderSample.Web / Views / Approach2 / editpublisher.vm
blob13776f1813d6b8c5b22553a91e7eb87eeb41e7ba
1 \r
2 <h3>Using DataBinder with Arrays</h3>\r
3 \r
4 #if($Flash.message)\r
5 <div>$Flash.message</div>\r
6 #end\r
7 \r
8 $Form.FormTag("%{action='update'}")\r
9 \r
10 <h4>Publisher</h4>\r
12 $Form.HiddenField("publisher.id")\r
14 Name: $Form.TextField("publisher.name")\r
16 <h4>Books</h4>\r
18 <table>\r
19   <tr>\r
20     <td>&nbsp;</td>\r
21     <td>Name</td>\r
22     <td>Author</td>\r
23   </tr>\r
24 #set($counter = 0)\r
25 #foreach($book in $publisher.Books)\r
26   <tr>\r
27     <td>\r
28     $book.Id\r
29     </td>\r
30     <td>\r
31   $Form.HiddenField("book[${counter}].Id", $book.Id)\r
32   $Form.TextFieldValue("book[${counter}].Name", $book.name)\r
33     </td>\r
34     <td>\r
35   $Form.TextFieldValue("book[${counter}].Author", $book.author)\r
36     </td>\r
37   </tr>\r
38 #set($counter = $counter + 1)\r
39 #end\r
40 </table>\r
42 <br/>\r
44 $Form.Submit("Save")\r
46 $Form.EndFormTag()\r