Hi The samples in woody doesn't seem to work correctly. I've included the html page in the beanbinding example below to show what I mean.
Some tags are not closed properly but rather closed at the end of the file. I've done some research and the problem seems to appear when updating src/blocks/woody/java/org/apache/cocoon/woody/transformation/WidgetReplacingPipe.java from revision 1.7 to 1.8. // Jonas -- http://localhost:8888/samples/woody/form2bean.flow --------- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Sample form This form is used to illustrate the Woody binding framework. The binding is based on JXPath and hence works both with XML documents and beans. Some warnings and limitations of the current implementation: the email address is marked in the binding as "read-only", meaning it will only be bound from bean/xml to form, but not in the other direction. So you won't see it changed in the bean or the XML. The binding doesn't support all widget types yet (e.g. the multivaluefield is currently not yet supported). Note how, in the XML binding, the date is formatted according XML Schema date format in the XML, while it is displayed in another format to the user, and is stored in the form model as a Java Date object (useful for date-specific validations). If you're running the XML-binding demo, then after successful submit you'll see the updated XML. If you're running the bean-binding demo, then after successful submit you'll be shown a page that uses the JXTemplateGenerator to extract data from the bean (to show that the bean really has been updated). Enter an email address: * Enter a phone number in \+([0-9]{1,3})-([0-9]{1,4})-([0-9]{5,7}) format * Please enter your IP address Your birthday (dd/MM/yyyy): * Select a number: 12345* I choose Firstname Lastname Phone Email Select </title> <link title="Default Style" href="/styles/main.css" rel="stylesheet"> </head> <body> <div class="resources"> <table cellpadding="3" width="100%"> <tbody> <tr> <td width="90%"> </td><td nowrap="nowrap"><a href="/samples/woody/form2bean.flow?cocoon-view=content" target="_blank">Content View</a></td><td nowrap="nowrap"><a href="/samples/view-source?filename=forms/form1_template.xml" target="_blank">Source</a></td><td nowrap="nowrap"><a href="/samples/view-source?filename=sitemap.xmap" target="_blank">Sitemap</a></td> </tr> </tbody> </table> </div> <h2>Sample form <p xmlns:wt="http://apache.org/cocoon/woody/template/1.0">This form is used to illustrate the Woody binding framework. The binding is based on JXPath and hence works both with XML documents and beans. Some warnings and limitations of the current implementation: <ul> <li>the email address is marked in the binding as "read-only", meaning it will only be bound from bean/xml to form, but not in the other direction. So you won't see it changed in the bean or the XML. <li>The binding doesn't support all widget types yet (e.g. the multivaluefield is currently not yet supported). <li>Note how, in the XML binding, the date is formatted according XML Schema date format in the XML, while it is displayed in another format to the user, and is stored in the form model as a Java Date object (useful for date-specific validations). <p>If you're running the XML-binding demo, then after successful submit you'll see the updated XML. <p>If you're running the bean-binding demo, then after successful submit you'll be shown a page that uses the JXTemplateGenerator to extract data from the bean (to show that the bean really has been updated). <form xmlns:wi="http://apache.org/cocoon/woody/instance/1.0" action="2c30227224262b5c4c63534d1859383b79008711.continue" method="POST"> <table border="1"> <tr> <td valign="top">Enter an <b>email</b> address: <td valign="top"><input value="[EMAIL PROTECTED]" name="email"><b>*</b> <tr> <td valign="top">Enter a phone number in \+([0-9]{1,3})-([0-9]{1,4})-([0-9]{5,7}) format <td valign="top"><input value="+32-2-123456" name="phone"><b>*</b> <tr> <td valign="top">Please enter your IP address <td valign="top"><input value="10.0.0.1" name="ipaddress"> <tr> <td valign="top">Your birthday (dd/MM/yyyy): <td valign="top"><input value="18/08/2003" name="birthday"><b>*</b> <tr> <td valign="top">Select a number: <td valign="top"><select name="number"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select><b>*</b> <tr> <td> <td valign="top"><input name="choose" value="true" type="checkbox"> I choose <br> <input value="1" name="contacts.size" type="hidden"> <table border="1"> <tr> <th>Firstname <th>Lastname <th>Phone <th>Email <th>Select <!-- The contents of the repeater-widget element is a template that will be applied to each row in the repeater. --> <tr> <!-- Don't show the id <td>[<wt:widget id="id"/>]</td> --> <td><input value="Herman" name="contacts.0.firstname"> <td><input value="" name="contacts.0.lastname"> <td><input value="" name="contacts.0.phone"> <td><input value="" name="contacts.0.email"> <td><input name="contacts.0.select" value="true" type="checkbox"> <tr> <td colspan="4" align="right"> <input name="addcontact" type="submit" value="Add contact"> <input name="removecontacts" type="submit" value="Remove selected contacts"> <input type="submit"> </input> </td> </tr> </td></td></td></td></td> </tr> </th></th></th></th></th> </tr> </table> </br> </td></td> </tr> </td></td> </tr> </td></td> </tr> </td></td> </tr> </td></td> </tr> </td></td> </tr> </table> </form> </p> </p> </li> </li> </li> </ul> </p> </h2> </body> </html>
