Apache » Cocoon »

  Cocoon Forms

Cocoon Forms 1.0

Output widget


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.

Note: The same can now be achieved using the normal Field widget and Widget States.

Possible alternative: 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.


<fd:output id="..." state="...">
  <fd:datatype base="...">
    <fd:attribute name="..." value="..."/>

See field widget for a description of the configuration elements.


An output widget is inserted in a template using the ft:widget tag:

<ft:widget id="..."/>
Errors and Improvements? If you see any errors or potential improvements in this document please help us: View, Edit or comment on the latest development version (registration required).