You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by da...@cocoon.zones.apache.org on 2006/07/22 14:02:20 UTC
[DAISY] Updated: Binding Framework
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/488.html
Document ID: 488
Branch: main
Language: default
Name: Binding Framework (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 7/19/06 5:20:29 PM
Updated by: Mark Lundquist
A new version has been created, state: draft
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 21115 bytes (previous version: 22629 bytes)
Content diff:
(144 equal lines skipped)
<p>binds repeater widgets</p>
</td>
<td>
--- <p>id, parent-path, row-path, unique-row-id (deprecated), unique-path
--- (deprecated)</p>
+++ <p>id, parent-path, row-path</p>
</td>
<td>
--- <p>fd:convertor (deprecated), fb:on-bind, fb:on-delete-row, fb:on-insert-row,
--- fb:unique-row</p>
+++ <p>fb:identity, fb:on-bind, fb:on-delete-row, fb:on-insert-row</p>
</td>
</tr>
<tr>
<td>
--- <p>fb:unique-row</p>
+++ <p>fb:identity</p>
</td>
<td>
<p>specifies unique fields for a repeater row</p>
(7 equal lines skipped)
</tr>
<tr>
<td>
--- <p>fb:unique-field</p>
--- </td>
--- <td>
--- <p>specifies unique field for a repeater row</p>
--- </td>
--- <td>
--- <p>id, path</p>
--- </td>
--- <td>
--- <p>fd:convertor</p>
--- </td>
--- </tr>
--- <tr>
--- <td>
<p>fb:set-attribute</p>
</td>
<td>
(273 equal lines skipped)
<li>id</li>
<li>parent-path</li>
<li>row-path</li>
--- <li>unique-row-id (deprecated)</li>
--- <li>unique-path (deprecated)</li>
<li>row-path-insert (optional)</li>
<li>direction (optional)</li>
</ul>
(2 equal lines skipped)
<ul>
<li>fb:identity</li>
--- <li>fd:convertor (deprecated)</li>
<li>fb:on-bind</li>
<li>fb:on-delete-row</li>
<li>fb:on-insert-row</li>
</ul>
--- <p><strong>NOTE:</strong> The attributes <tt>unique-row-id</tt> and
--- <tt>unique-path</tt> and the child element <tt>fd:convertor</tt> are deprecated
--- in favor of <fb:unique-row>.</p>
---
<p>The <tt>fb:repeater</tt> binding binds repeaters based on the concept that
--- each row in the repeater is identified by one or more widgets uniquely. This
--- unique identification is necessary to know which rows in the repeater correspond
--- to which objects in the target collection. Newly added rows in the repeater can
--- (but should not) have a null value for this identification widget(s). Typically
--- this/these widget(s) will not editable, so in most cases it will be an output
--- widget. If you don't need the identification widget(s) at the client you don't
--- need to add them to the template at all! You only have to specify
--- <tt>direction="load"</tt> to this/these widget(s) then. This prevents the
--- database IDs from getting to the client.</p>
+++ each row in the repeater is uniquely identified by the value(s) of one or more
+++ of its widgets. This unique identification is necessary to know which rows in
+++ the repeater correspond to which objects in the target collection, and is
+++ specified using a <fb:identity> child element.</p>
--- <p>The <tt>id</tt> attribute should contain the id of the repeater.</p>
+++ <p>The <tt>id</tt> attribute denotes the id of the repeater as specified in the
+++ form definition.</p>
--- <p>The <tt>unique-row-id</tt> attribute specifies the id of the widget appearing
--- on each repeater row that contains the unique identification for that row. The
--- unique-path attribute contains the corresponding path in the object model.</p>
---
--- <p><strong>NOTE</strong>: Both attributes are deprecated. Please use
--- <tt><fb:identity></tt> instead.</p>
---
<p>The <tt>parent-path</tt> and <tt>row-path</tt> attributes can best be
understood when described differently for XML documents and Javabeans.</p>
(25 equal lines skipped)
</li>
</ul>
--- <p>A child element <tt>fd:convertor</tt> can be used to specify the convertor to
--- use in case the unique-id from the model is a String (typical for XML documents)
--- and the matching widget inside the repeater has a different type.</p>
---
--- <p><strong>NOTE:</strong> This element is deprecated at that place as it is only
--- used in combination with the deprecated attributes unique-row-id and
--- unique-path. Please use <tt><fb:identity></tt> instead.</p>
---
<p>The three remaining child elements <tt>fb:on-bind</tt>,
<tt>fb:on-delete-row</tt>, <tt>fb:on-insert-row</tt> should contain the binding
elements that have to be executed in case of these three events.</p>
(13 equal lines skipped)
<tt>fb:insert-node</tt> or a <tt>fb:insert-bean</tt> binding (see the
descriptions of these binding elements for more details).</p>
--- <p>The childrens of the <tt>fb:unique-row</tt> specify the widgets appearing on
--- each repeater row for the unique identification of that row. Each
--- <fb:unique-field> child specifies one widget.</p>
---
<h2>fb:identity</h2>
<p>Child elements:</p>
<ul>
--- <li>fb:value widget-bindings that make up the identity</li>
+++ <li>fb:value widget bindings constituting the repeater row identity</li>
</ul>
<p>The <tt><fb:identity></tt> is just a container for the child elements
--- specifying the bindings of the identification widgets.</p>
+++ specifying the bindings of the row identity widgets.</p>
--- <p>The nested elements just describe regular value bindings that can declare
--- their own convertor if needed.</p>
+++ <p>The nested elements just describe regular value bindings (these can declare
+++ their own convertors if needed). Newly added rows in the repeater can (but
+++ should not) have a null value for the identity widget(s). Identity widgets
+++ typically are uneditable and are specified as <fd:output> widgets. If you
+++ don't need the identity widget(s) at the client, you don't need to add them to
+++ the template at all! This prevents, e.g., database IDs from getting to the
+++ client.</p>
<p><strong>NOTE:</strong> This 'identity' binding is only active in the 'load'
operation, so specifying the direction="save" is meaningless.</p>
(254 equal lines skipped)
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
no changes