| <?xml version="1.0"?> |
| <xsp:page language="java" |
| xmlns:xsp="http://apache.org/xsp"> |
| |
| <xsp:structure> |
| <xsp:include>org.apache.cocoon.woody.formmodel.*</xsp:include> |
| </xsp:structure> |
| |
| <page> |
| <title>Sample form result</title> |
| <content> |
| <xsp:logic> |
| // get reference to form and some of the widgets on it |
| Form form = (Form)request.getAttribute("form1"); |
| Field field = (Field)form.getWidget("email"); |
| BooleanField booleanField = (BooleanField)form.getWidget("somebool"); |
| Field field2 = (Field)((Repeater)form.getWidget("contacts")).getWidget(1, "firstname"); |
| </xsp:logic> |
| |
| email has the following value: |
| <xsp:expr>field.getValue()</xsp:expr> |
| <br/> |
| Second person has this firstname: |
| <xsp:expr>field2.getValue()</xsp:expr> |
| <br/> |
| The value of the checkbox is: |
| <xsp:expr>booleanField.getValue()</xsp:expr> |
| </content> |
| </page> |
| </xsp:page> |