| <?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. |
| --> |
| <!-- This file is similar to form1_template_action.xml. They differ in group layout, |
| form's action attribute (to use continuations) and, this one is a dynamic form |
| template that changes the 'contacts' repeater layout depending on its size --> |
| <page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" |
| xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" |
| xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"> |
| |
| <!-- Import the macros that define CForms template elements --> |
| <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/> |
| <h4 class="samplesGroup">Widget sampler: one form divided in multiple pages</h4> |
| <title>Sample multipage form with Ajax updates</title> |
| <script type="text/javascript"> |
| dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.yellow}); |
| </script> |
| <content> |
| <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true"> |
| <div style="width: 70%; margin: 10px 50px 50px 50px;"> |
| |
| <ft:group id="page1"> |
| <div id="page1"> |
| <!-- group with automatic two-column layout --> |
| <fi:group> |
| <fi:label>String fields</fi:label> |
| <fi:styling type="fieldset" layout="columns"/> |
| <fi:items> |
| <ft:widget id="email"/> |
| <ft:widget id="birthdate"/> |
| <ft:widget id="fourchars"> |
| <!-- particular styling for the enumeration --> |
| <fi:styling list-type="listbox" listbox-size="4"/> |
| </ft:widget> |
| </fi:items> |
| </fi:group> |
| |
| <br/> |
| <ft:widget id="next"/> |
| </div> |
| </ft:group> |
| |
| <ft:group id="page2"> |
| <div id="page2"> |
| <fi:group> |
| <fi:label>Number fields</fi:label> |
| <fi:styling type="fieldset" layout="columns"/> |
| <fi:items> |
| <ft:widget id="number1"/> |
| <ft:widget id="number2"/> |
| <ft:widget id="account"/> |
| <ft:widget id="cowheight"> |
| <fi:styling list-type="radio"/> |
| </ft:widget> |
| </fi:items> |
| </fi:group> |
| |
| <br/> |
| <ft:widget id="prev"/> |
| <ft:widget id="next"/> |
| </div> |
| </ft:group> |
| |
| <ft:group id="page3"> |
| <div id="page3"> |
| <fi:group> |
| <fi:styling type="fieldset" layout="columns"/> |
| <fi:label>Boolean fields</fi:label> |
| <fi:items> |
| <ft:widget id="somebool"/> |
| <ft:widget id="drinks"> |
| <fi:styling list-type="listbox" listbox-size="4"/> |
| </ft:widget> |
| </fi:items> |
| </fi:group> |
| |
| <br/> |
| <ft:widget id="prev"/> |
| <ft:widget id="ok"/> |
| </div> |
| </ft:group> |
| |
| </div> |
| </ft:form-template> |
| |
| <a href="do-multipage.flow">Restart this sample</a> - <a href="./">Back to Forms samples</a> |
| </content> |
| </page> |