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 / singleTaskFormModel.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.3 KB  |  98 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2.  
  3. <!--
  4.   Copyright 1999-2004 The Apache Software Foundation
  5.  
  6.   Licensed under the Apache License, Version 2.0 (the "License");
  7.   you may not use this file except in compliance with the License.
  8.   You may obtain a copy of the License at
  9.  
  10.       http://www.apache.org/licenses/LICENSE-2.0
  11.  
  12.   Unless required by applicable law or agreed to in writing, software
  13.   distributed under the License is distributed on an "AS IS" BASIS,
  14.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15.   See the License for the specific language governing permissions and
  16.   limitations under the License.
  17. -->
  18.  
  19. <!-- Cocoon Forms model used to edit a TaskBean -->
  20.  
  21. <fd:form
  22.     id="form"
  23.     xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
  24.     >
  25.  
  26.     <fd:widgets>
  27.  
  28.         <fd:output id="taskId" readonly="true" required="true">
  29.             <fd:label>Task ID</fd:label>
  30.             <fd:datatype base="integer"/>
  31.         </fd:output>
  32.  
  33.         <fd:field id="taskName" required="true">
  34.             <fd:label>Task name</fd:label>
  35.             <fd:datatype base="string"/>
  36.         </fd:field>
  37.  
  38.         <fd:field id="assignedTo" required="true">
  39.             <fd:label>Assigned to</fd:label>
  40.             <fd:datatype base="string"/>
  41.         </fd:field>
  42.  
  43.         <!-- a TaskBean contains multiple TaskBeanComments -->
  44.         <fd:repeater id="comments">
  45.             <fd:label>Comments</fd:label>
  46.  
  47.             <fd:widgets>
  48.                 <!-- Forms requires a unique ID in repeaters -->
  49.                 <fd:output id="id">
  50.                     <fd:datatype base="string"/>
  51.                 </fd:output>
  52.  
  53.                 <!-- Make comments selectable for deletion -->
  54.                 <fd:booleanfield id="select">
  55.                   <fd:label>Select</fd:label>
  56.                 </fd:booleanfield>
  57.  
  58.                 <!-- Editable comment date -->
  59.                 <fd:field id="date" required="true">
  60.                     <fd:label>Date</fd:label>
  61.                     <fd:datatype base="date">
  62.                       <fd:convertor>
  63.                         <fd:patterns>
  64.                           <fd:pattern>dd/MM/yyyy</fd:pattern>
  65.                         </fd:patterns>
  66.                       </fd:convertor>
  67.                     </fd:datatype>
  68.                 </fd:field>
  69.  
  70.                 <!-- Editable comment with validation example -->
  71.                 <fd:field id="comment" required="true">
  72.                     <fd:label>Comment</fd:label>
  73.                     <fd:datatype base="string">
  74.                         <fd:validation>
  75.                             <fd:length min="5" max="150">
  76.                                  <fd:failmessage>The comment length must be between 5 and 150 characters</fd:failmessage>
  77.                             </fd:length>
  78.                         </fd:validation>
  79.                     </fd:datatype>
  80.                 </fd:field>
  81.  
  82.             </fd:widgets>
  83.         </fd:repeater>
  84.  
  85.         <!-- Forms action: add a new comment -->
  86.         <fd:repeater-action id="addcomment" action-command="add-row" repeater="comments">
  87.           <fd:label>Add comment</fd:label>
  88.         </fd:repeater-action>
  89.  
  90.         <!-- Forms action: remove a comment -->
  91.         <fd:repeater-action id="removecomment" action-command="delete-rows" repeater="comments" select="select">
  92.           <fd:label>Remove selected comments</fd:label>
  93.         </fd:repeater-action>
  94.  
  95.     </fd:widgets>
  96.  
  97. </fd:form>
  98.