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: MultiValueField widget
Date Thu, 06 Oct 2005 09:14:42 GMT
A document has been updated:

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

Document ID: 490
Branch: main
Language: default
Name: MultiValueField widget (previously Cocoon Forms: multivaluefield widget)
Document Type: Document (unchanged)
Updated on: 10/6/05 9:14:37 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: 2307 bytes (previous version: 1706 bytes)
Content diff:
(20 equal lines skipped)
    
    <h1>Configuration</h1>
    
--- <pre>&lt;fd:multivaluefield id="..."&gt;
+++ <pre>&lt;fd:multivaluefield id="..." state="..."&gt;
      &lt;fd:label&gt;...&lt;/fd:label&gt;
      &lt;fd:help&gt;...&lt;/fd:help&gt;
      &lt;fd:hint&gt;...&lt;/fd:hint&gt;
(9 equal lines skipped)
      &lt;fd:on-value-changed&gt;
         [...]
      &lt;/fd:on-value-changed&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:multivaluefield&gt;</pre>
    
    <p>Most of the elements and attributes have the same meaning as for the
(3 equal lines skipped)
    use the value-count validator to check the number of values the user has
    selected.</p>
    
+++ <h1>API notes</h1>
+++ 
+++ <p>As mentioned above, the value of multivaluefield widget is a Java array. So
+++ when using the API from javascript, you also need to create a Java array. For
+++ example, if the datatype of the field is "long", you could create an array as
+++ follows:</p>
+++ 
+++ <pre>var values = java.lang.reflect.Array.newInstance(java.lang.Long.TYPE, 3);
+++ values[0] = 1;
+++ values[1] = 2;
+++ values[2] = 3;
+++ multivaluefield.setValue(values);
+++ </pre>
+++ 
    </body>
    </html>


Fields
======
no changes

Links
=====
no changes

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

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

Mime
View raw message