home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Copyright 1999-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
-
- <document>
- <header>
- <title>Cocoon Forms: output widget</title>
- <authors>
- <person name="The Apache Cocoon Team" email="dev@cocoon.apache.org"/>
- </authors>
- </header>
- <body>
- <s1 title="Concept">
- <p>An fd:output widget is similar to a field widget, but its value
- is not editable. The value of an output widget must be set programmatically
- (or through binding). An output widget does not read its value from
- the request, so is most useful in the case where the form is stored
- accross requests (automatically the case when using flowscript). An
- output widget does not perform any validation, it is always considered
- to be valid.</p>
-
- <note>It is likely that we'll add a generalized 'readonly' capability
- to all widgets. When we do that, fd:output will become obsolete and
- can be replaced by a 'readonly' field wiget. In the meantime you can
- safely use fd:output since this change won't have much impact.</note>
-
- <p><strong>Possible alternative:</strong> On each widget you can
- also store additional information
- (i.e. arbitrary Java objects) in attributes. See the Java API
- of the Widget interface, methods setAttribute and getAttribute.
- You can then retrieve these attributes using the JXTemplate generator.</p>
- </s1>
-
- <s1 title="Configuration">
- <source><![CDATA[<fd:output id="...">
- <fd:label>...</fd:label>
- <fd:help>...</fd:help>
- <fd:hint>...</fd:hint>
- <fd:datatype base="...">
- [...]
- </fd:datatype>
- </fd:output>]]></source>
-
- <p>See <link href="widget_field.html">field widget</link> for a description
- of the configuration elements.</p>
- </s1>
- </body>
- </document>
-