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-split.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.0 KB  |  92 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 multiple input fields.
  21.     |
  22.     | CVS $Id: template-split.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: Split</title>
  29.   <content>
  30.     <p>
  31.       On this form, you can enter phone and date, each as splitted on several fields.
  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 aggregated into one value</li>
  47.                 <li>Each value is validated</li>
  48.                 <li>Each 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:aggregate-widget id="phone">
  61.                   <ft:widget id="part1"/>
  62.                   <ft:widget id="part2"/>
  63.                   <ft:widget id="part3"/>
  64.                   <ft:widget id="part4"/>
  65.                 </ft:aggregate-widget>
  66.  
  67.                 <ft:aggregate-widget id="date">
  68.                   <ft:widget id="day"/>
  69.                   <ft:widget id="month"/>
  70.                   <ft:widget id="year"/>
  71.                 </ft:aggregate-widget>
  72.               </fi:items>
  73.             </fi:group>
  74.  
  75.             <input type="submit" value="Submit"/>
  76.           </td>
  77.           <td>
  78.             <table cellpadding="3">
  79.               <tr>
  80.                 <td>Phone</td><th>#{phone}</th>
  81.               </tr>
  82.               <tr>
  83.                 <td>Date</td><th>#{date}</th>
  84.               </tr>
  85.             </table>
  86.           </td>
  87.         </tr>
  88.       </table>
  89.     </ft:form-template>
  90.   </content>
  91. </page>
  92.