cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Union widget
Date Wed, 12 Oct 2005 14:14:55 GMT
A document has been updated:

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

Document ID: 741
Branch: main
Language: default
Name: Union widget (unchanged)
Document Type: Document (unchanged)
Updated on: 10/12/05 2:14:46 PM
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: 2749 bytes (previous version: 1469 bytes)
Content diff:
(41 equal lines skipped)
    </ft:union>
    </pre>
    
--- <p>Of course, you also need to insert the case widget in the template. Use the
--- <tt>submit-on-change</tt> option to let the union widget automatically switch
to
--- the case selected in the case widget:</p>
+++ <h1>Example</h1>
    
--- <pre>&lt;ft:widget id="my-case-widget"&gt;
+++ <p>Definition:</p>
+++ 
+++ <pre>&lt;fd:field id="testcase"&gt;
+++   &lt;fd:datatype base="string"/&gt;
+++   &lt;fd:selection-list&gt;
+++     &lt;fd:item value="case1"&gt;Case 1&lt;/fd:item&gt;
+++     &lt;fd:item value="case2"&gt;Case 2&lt;/fd:item&gt;
+++   &lt;/fd:selection-list&gt;
+++ &lt;/fd:field&gt;
+++ 
+++ &lt;fd:union id="testunion" case="testcase"&gt;
+++   &lt;fd:widgets&gt;
+++     &lt;fd:group id="case1"&gt;
+++       &lt;fd:field id="field1"&gt;
+++         &lt;fd:datatype base="string"/&gt;
+++       &lt;/fd:field&gt;
+++       &lt;fd:field id="field2"&gt;
+++         &lt;fd:datatype base="string"/&gt;
+++       &lt;/fd:field&gt;
+++     &lt;/fd:group&gt;
+++     &lt;fd:group id="case2"&gt;
+++       &lt;fd:field id="field1"&gt;
+++         &lt;fd:datatype base="long"/&gt;
+++       &lt;/fd:field&gt;
+++       &lt;fd:field id="field2"&gt;
+++         &lt;fd:datatype base="long"/&gt;
+++       &lt;/fd:field&gt;
+++     &lt;/fd:group&gt;
+++   &lt;/fd:widgets&gt;
+++ &lt;/fd:union&gt;
+++ </pre>
+++ 
+++ <p>Template:</p>
+++ 
+++ <pre>&lt;ft:widget id="testcase"&gt;
      &lt;fi:styling list-type="dropdown" submit-on-change="true"/&gt;
    &lt;/ft:widget&gt;
+++ 
+++ &lt;ft:union id="testunion"&gt;
+++   &lt;ft:case id="case1"&gt;
+++     &lt;ft:group id="case1"&gt;
+++       &lt;ft:widget id="field1"/&gt;
+++       &lt;ft:widget id="field2"/&gt;
+++     &lt;/ft:group&gt;
+++   &lt;/ft:case&gt;
+++   &lt;ft:case id="case2"&gt;
+++     &lt;ft:group id="case2"&gt;
+++       &lt;ft:widget id="field1"/&gt;
+++       &lt;ft:widget id="field2"/&gt;
+++     &lt;/ft:group&gt;
+++   &lt;/ft:case&gt;
+++ &lt;/ft:union&gt;
    </pre>
    
+++ <p>Note the use of <tt>submit-on-change</tt> on the case widget to let
the union
+++ widget automatically switch when the case is changed.</p>
+++ 
    </body>
    </html>


Fields
======
no changes

Links
=====
no changes

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

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

Mime
View raw message