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 / singleTaskFormBinding.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  1.8 KB  |  57 lines

  1. <?xml version="1.0"?>
  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 binding used to edit a TaskBean -->
  20.  
  21. <fb:context
  22.     id="form"
  23.     xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
  24.     path="/" >
  25.  
  26.     <!-- map Form widgets to the corresponding fields in the java beans -->
  27.     <fb:value id="taskId" path="id" direction="load"/>
  28.     <fb:value id="taskName" path="taskName"/>
  29.     <fb:value id="assignedTo" path="assignedTo"/>
  30.  
  31.     <!-- One-to-many relationship between TaskBean and TaskCommentBean -->
  32.     <!-- Forms repeater requires unique identification mechanism of the row-nodes -->
  33.     <fb:repeater id="comments"
  34.       parent-path="."
  35.       row-path="comments"
  36.       unique-row-id="id"
  37.       unique-path="@id">
  38.  
  39.       <fb:on-bind>
  40.         <!-- executed on updates AND right after the insert -->
  41.         <fb:value id="date" path="date"/>
  42.         <fb:value id="comment" path="comment"/>
  43.       </fb:on-bind>
  44.  
  45.       <fb:on-delete-row>
  46.         <fb:delete-node/>
  47.       </fb:on-delete-row>
  48.  
  49.       <fb:on-insert-row>
  50.         <fb:insert-bean
  51.           classname="org.apache.cocoon.samples.tour.beans.TaskCommentBean"
  52.           addmethod="addComment"/>
  53.       </fb:on-insert-row>
  54.     </fb:repeater>
  55.  
  56. </fb:context>
  57.