home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <!--
- Copyright 1999-2004 The Apache Software Foundation
-
- Licensed 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.
- -->
-
- <!-- Cocoon Forms binding used to edit a TaskBean -->
-
- <fb:context
- id="form"
- xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
- path="/" >
-
- <!-- map Form widgets to the corresponding fields in the java beans -->
- <fb:value id="taskId" path="id" direction="load"/>
- <fb:value id="taskName" path="taskName"/>
- <fb:value id="assignedTo" path="assignedTo"/>
-
- <!-- One-to-many relationship between TaskBean and TaskCommentBean -->
- <!-- Forms repeater requires unique identification mechanism of the row-nodes -->
- <fb:repeater id="comments"
- parent-path="."
- row-path="comments"
- unique-row-id="id"
- unique-path="@id">
-
- <fb:on-bind>
- <!-- executed on updates AND right after the insert -->
- <fb:value id="date" path="date"/>
- <fb:value id="comment" path="comment"/>
- </fb:on-bind>
-
- <fb:on-delete-row>
- <fb:delete-node/>
- </fb:on-delete-row>
-
- <fb:on-insert-row>
- <fb:insert-bean
- classname="org.apache.cocoon.samples.tour.beans.TaskCommentBean"
- addmethod="addComment"/>
- </fb:on-insert-row>
- </fb:repeater>
-
- </fb:context>
-