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 2005/10/06 12:05:57 UTC

[DAISY] Updated: Aggregatefield widget

A document has been updated:

http://cocoon.zones.apache.org/daisy/documentation/486.html

Document ID: 486
Branch: main
Language: default
Name: Aggregatefield widget (previously Cocoon Forms: aggregatefield widget)
Document Type: Document (unchanged)
Updated on: 10/6/05 10:05:36 AM
Updated by: Bruno Dumon

A new version has been created, state: publish

Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 1696 bytes (previous version: 110 bytes)
Content diff:
(2 equal lines skipped)
    
    <h1>Concept</h1>
    
--- <p>TO BE DONE</p>
+++ <p> An aggregated field allows to represent one value as multiple input fields,
+++ or several values as one field. Hence this widget is a field and a container
+++ widget simultaneously.</p>
    
+++ <p>Upon submit, it first attempts to read own value from the request, and splits
+++ over nested field widgets using a regular expression. If split fails, this will
+++ simply give a validation error. If own value was not submitted, it attempts to
+++ read values for nested field widgets, and combines theirs values using combine
+++ expression.</p>
+++ 
+++ <p>To validate this widget, both the validation rules of the nested widgets are
+++ checked, and those of the aggregated field themselves. The validation rules of
+++ the aggregated field can perform checks on the string as entered by the user
+++ (e.g. check its total length).</p>
+++ 
+++ <p>This field and nested fields can be of any supported type, as long as combine
+++ expression gives result of the correct type, and split regular expression can
+++ split string representation into parts which can be converted to the values of
+++ nested fields.</p>
+++ 
    <h1>Configuration</h1>
    
--- <p>TO BE DONE</p>
+++ <pre>&lt;fd:aggregatefield id="..." state="..."&gt;
+++   &lt;fd:widgets&gt;
+++     &lt;fd:field .../&gt;
+++     [... more fd:field elements ...]
+++   &lt;/fd:widgets&gt;
+++   &lt;fd:split pattern="..."&gt;
+++     &lt;fd:map group="..." field="..."/&gt;
+++     [... more fd:map elements ...]
+++     &lt;fd:failmessage&gt;...&lt;/fd:failmessage&gt;
+++   &lt;/fd:split&gt;
+++   &lt;fd:combine expression="..."/&gt;
+++   &lt;fd:on-create&gt;
+++     [...]
+++   &lt;/fd:on-create&gt;
+++   &lt;fd:attributes&gt;
+++     &lt;fd:attribute name="..." value="..."/&gt;
+++   &lt;/fd:attributes&gt;
+++ &lt;/fd:aggregatefield&gt;
+++ </pre>
    
    </body>
    </html>


Fields
======
no changes

Links
=====
no changes

Custom Fields
=============
no changes

Collections
===========
no changes