| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!--+ |
| | CForms aggregate sample binding. Represent values of two aggregate |
| | fields as single input fields. |
| | |
| | CVS $Id$ |
| +--> |
| |
| <page xmlns:wt="http://apache.org/cocoon/woody/template/1.0" |
| xmlns:wi="http://apache.org/cocoon/woody/instance/1.0" |
| xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"> |
| <title>Aggregate Field: Combine</title> |
| <content> |
| <p> |
| On this form, you can enter phone and date, each as one field. |
| </p> |
| <wt:form-template action="${cocoon.continuation.id}.continue" method="POST"> |
| <table align="center"> |
| <tr> |
| <th style="border-bottom: solid 1px black;">Explanation</th> |
| <th style="border-bottom: solid 1px black;">Form</th> |
| <th style="border-bottom: solid 1px black;">Data Model</th> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| When you click submit, following happens: |
| <ul> |
| <li>Input values are validated</li> |
| <li>Input values are split onto parts</li> |
| <li>Each part value is validated</li> |
| <li>Each part value saved into the backend data model</li> |
| </ul> |
| </p> |
| <p> |
| Switch to another aggregation example: |
| </p> |
| <wt:widget id="switch"/> |
| </td> |
| <td> |
| <wi:group> |
| <wi:styling layout="columns"/> |
| <wi:items> |
| <wt:widget id="phone"/> |
| <wt:widget id="date"/> |
| </wi:items> |
| </wi:group> |
| <input type="submit" value="Submit"/> |
| </td> |
| <td> |
| <table cellpadding="3"> |
| <tr> |
| <td>Phone, part 1</td><th>#{part1}</th> |
| </tr> |
| <tr> |
| <td>Phone, part 2</td><th>#{part2}</th> |
| </tr> |
| <tr> |
| <td>Phone, part 3</td><th>#{part3}</th> |
| </tr> |
| <tr> |
| <td>Phone, part 4</td><th>#{part4}</th> |
| </tr> |
| <tr> |
| <td>Date, Day</td><th>#{day}</th> |
| </tr> |
| <tr> |
| <td>Date, Month</td><th>#{month}</th> |
| </tr> |
| <tr> |
| <td>Date, Year</td><th>#{year}</th> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </wt:form-template> |
| </content> |
| </page> |