[DAISY] Updated: Cocoon Forms: Javascript API
| Newsgroups | gmane.text.xml.cocoon.documentation |
|---|---|
| Message-ID | <[email protected]> |
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/491.html
Document ID: 491
Branch: main
Language: default
Name: Cocoon Forms: Javascript API (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 4/14/08 4:45:20 PM
Updated by: Luca Morandini
A new version has been created, state: draft
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 3048 bytes (previous version: 2457 bytes)
Content diff:
(4 equal lines skipped)
<h2>Introduction</h2>
--- <p>TBD</p>
+++ <p>This API lets you manipulate Cocoon Forms using Flowacript</p>
--- <h2>Form handling</h2>
+++ <h2>Widgets</h2>
--- <p>TBD</p>
+++ <p>A Form is basically a collection of Widgets, and this API lets you get a
+++ reference to a single widget (using getChild or lookupWidget methods of the Form
+++ objects) and manipulate it using the
+++ <a href="http://cocoon.apache.org/2.2/blocks/forms/1.0/apidocs/org/apache/cocoon/forms/formmodel/Widget.html">Widget
+++ interface</a>. A Form is itself a Widget, hence you acan access its Widget
+++ interface using the getModel method. To set the state of a Widget, the
+++ WidgeState Java class has to be imported, with this statement:</p>
--- <h2>Widget handling</h2>
+++ <pre>importClass(org.apache.cocoon.forms.formmodel.WidgetState);</pre>
--- <p>TBD</p>
+++ <p>While the state is set with <tt>setState</tt> method, like in:</p>
+++ <pre>form1.getChild("msg").setState(WidgetState.OUTPUT);
+++ </pre>
+++
<h2>Form object reference</h2>
<h3>Constructors</h3>
(71 equal lines skipped)
<tt>uri</tt> the page uri (like in cocoon.sendPageAndWait())<br/>
<tt>viewdata</tt> some data for the view (like in cocoon.sendPageAndWait()).</p>
--- <h4>processForm</h4>
---
--- <p>Process stateless form submit.<br/>
--- <tt>viewdata</tt> some data for the view (like in cocoon.sendPageAndWait()).</p>
---
</body>
</html>