home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / template-combine.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.1 KB  |  96 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <!--+
  19.     | CForms aggregate sample binding. Represent values of two aggregate
  20.     | fields as single input fields.
  21.     |
  22.     | CVS $Id: template-combine.xml,v 1.1 2004/03/09 10:34:08 reinhard Exp $
  23.     +-->
  24.  
  25. <page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" 
  26.       xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" 
  27.       xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
  28.   <title>Aggregate Field: Combine</title>
  29.   <content>
  30.     <p>
  31.       On this form, you can enter phone and date, each as one field.
  32.     </p>
  33.     <ft:form-template action="${cocoon.continuation.id}.continue" method="POST">
  34.       <table align="center">
  35.         <tr>
  36.           <th style="border-bottom: solid 1px black;">Explanation</th>
  37.           <th style="border-bottom: solid 1px black;">Form</th>
  38.           <th style="border-bottom: solid 1px black;">Data Model</th>
  39.         </tr>
  40.         <tr>
  41.           <td>
  42.             <p>
  43.               When you click submit, following happens:
  44.               <ul>
  45.                 <li>Input values are validated</li>
  46.                 <li>Input values are split onto parts</li>
  47.                 <li>Each part value is validated</li>
  48.                 <li>Each part value saved into the backend data model</li>
  49.               </ul>
  50.             </p>
  51.             <p>
  52.               Switch to another aggregation example:
  53.             </p>
  54.             <ft:widget id="switch"/>
  55.           </td>
  56.           <td>
  57.             <fi:group>
  58.               <fi:styling layout="columns"/>
  59.               <fi:items>
  60.                 <ft:widget id="phone"/>
  61.                 <ft:widget id="date"/>
  62.               </fi:items>
  63.             </fi:group>
  64.             <input type="submit" value="Submit"/>
  65.           </td>
  66.           <td>
  67.             <table cellpadding="3">
  68.               <tr>
  69.                 <td>Phone, part 1</td><th>#{part1}</th>
  70.               </tr>
  71.               <tr>
  72.                 <td>Phone, part 2</td><th>#{part2}</th>
  73.               </tr>
  74.               <tr>
  75.                 <td>Phone, part 3</td><th>#{part3}</th>
  76.               </tr>
  77.               <tr>
  78.                 <td>Phone, part 4</td><th>#{part4}</th>
  79.               </tr>
  80.               <tr>
  81.                 <td>Date, Day</td><th>#{day}</th>
  82.               </tr>
  83.               <tr>
  84.                 <td>Date, Month</td><th>#{month}</th>
  85.               </tr>
  86.               <tr>
  87.                 <td>Date, Year</td><th>#{year}</th>
  88.               </tr>
  89.             </table>
  90.           </td>
  91.         </tr>
  92.       </table>
  93.     </ft:form-template>
  94.   </content>
  95. </page>
  96.