You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2004/03/13 12:22:00 UTC
cvs commit: cocoon-2.1/src/blocks/forms/samples/forms form2_bind_bean.xml form2_bind_xml.xml
vgritsenko 2004/03/13 03:22:00
Modified: src/blocks/forms/samples/forms form2_bind_bean.xml
form2_bind_xml.xml
Log:
comments
Revision Changes Path
1.3 +31 -22 cocoon-2.1/src/blocks/forms/samples/forms/form2_bind_bean.xml
Index: form2_bind_bean.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/forms/form2_bind_bean.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- form2_bind_bean.xml 12 Mar 2004 03:31:39 -0000 1.2
+++ form2_bind_bean.xml 13 Mar 2004 11:22:00 -0000 1.3
@@ -14,30 +14,36 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!-- Example binding to bind the "form2" form to the bean "Form2Bean" -->
-<!-- The id attributes on the elements in this file map to widgets in the
- form definition. The path attributes are JXPath expressions addressing
- properties of the bean. -->
-
-<!-- It would be an interesting exercise to generate this file from
- javadoc-tags in the bean using an xdoclet-like approach. -->
+<!--
+ - Example binding to bind the "form2" form to the bean "Form2Bean"
+ -
+ - The id attributes on the elements in this file map to widgets in the
+ - form definition. The path attributes are JXPath expressions addressing
+ - properties of the bean.
+ -
+ - It would be an interesting exercise to generate this file from
+ - javadoc-tags in the bean using an xdoclet-like approach.
+ -->
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" path="/" >
- <!-- the email value will not be saved because of the @direction="load" -->
+ <!-- The email value will not be saved because of the @direction="load" -->
<fb:value id="email" path="email" direction="load"/>
+
<fb:value id="ipaddress" path="ipAddress"/>
<fb:value id="birthday" path="birthday"/>
<fb:value id="number" path="aNumber"/>
<fb:value id="choose" path="choose"/>
<fb:value id="sex" path="sex"/>
- <!-- An aggregatefield is a special kind of widget that lets
- the user edit the value of multiple widgets through one text box
- (see also the form definition for how this works). In this case
- it is used to map the different parts of a phone number to different
- bean properties. -->
+ <!--
+ - An aggregatefield is a special kind of widget that lets
+ - the user edit the value of multiple widgets through one text box,
+ - or single widgets through multiple boxes. (see also samples in
+ - ../aggregate directory). In this case it is used to map the different
+ - parts of a phone number to different bean properties.
+ -->
<fb:aggregate id="phone" path="." >
<fb:value id="number" path="phoneNumber"/>
<fb:value id="zone" path="phoneZone"/>
@@ -46,21 +52,24 @@
<fb:multi-value id="drinks" parent-path="." row-path="drinks" direction="load"/>
- <!-- repeater requires unique identification mechanism of the row-nodes -->
- <!-- (it is of course possible to implement other binding strategies) -->
- <!-- important note: the row-path is used inside jxpath-createPath context,
- as a consequence it cannot have dependent children or predicates -->
+ <!--
+ - Repeater requires unique identification mechanism of the row-nodes.
+ - (it is of course possible to implement other binding strategies)
+ -
+ - Important NOTE: When adding rows, the row-path is used inside
+ - jxpath-createPath context, as a consequence it cannot have dependent
+ - children or predicates.
+ -->
<fb:repeater id="contacts"
- parent-path="."
- row-path="contacts"
- unique-row-id="id"
- unique-path="@id">
+ parent-path="."
+ row-path="contacts"
+ unique-row-id="id"
+ unique-path="@id">
<fb:identity>
<!-- compare to xml-binding: the convertor is not needed here -->
<fb:value id="id" path="@id"/>
</fb:identity>
-
<fb:on-bind>
<!-- executed on updates AND right after the insert -->
1.3 +15 -10 cocoon-2.1/src/blocks/forms/samples/forms/form2_bind_xml.xml
Index: form2_bind_xml.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/forms/form2_bind_xml.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- form2_bind_xml.xml 12 Mar 2004 03:31:39 -0000 1.2
+++ form2_bind_xml.xml 13 Mar 2004 11:22:00 -0000 1.3
@@ -14,11 +14,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<!--
- | Binding template between
- | - form_data file (backend)
- | - and form_model file
- -->
+ - Binding template between
+ - * form_data file (backend)
+ - * and form_model file
+ -->
<fb:context
xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
@@ -68,12 +69,17 @@
<fb:multi-value id="drinks" parent-path="drinks" row-path="drink"/>
- <!-- repeater requires unique identification mechanism of the row-nodes -->
- <!-- important note: the row-path is used inside jxpath-createPath context,
- as a consequence it cannot have dependent children or predicates -->
+ <!--
+ - Repeater requires unique identification mechanism of the row-nodes.
+ - (it is of course possible to implement other binding strategies)
+ -
+ - Important NOTE: When adding rows, the row-path is used inside
+ - jxpath-createPath context, as a consequence it cannot have dependent
+ - children or predicates.
+ -->
<fb:repeater id="contacts"
- parent-path="contacts"
- row-path="contact">
+ parent-path="contacts"
+ row-path="contact">
<fb:identity>
<fb:value id="id" path="@id">
@@ -81,7 +87,6 @@
<fd:convertor datatype="long" />
</fb:value>
</fb:identity>
-
<fb:on-bind>
<!-- executed on updates AND right after the insert -->