cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [WIKI-UPDATE] WoodyXSLT Woody WoodyFAQ DocsWishlist Sun Nov 2 18:00:04 2003
Date Sun, 02 Nov 2003 17:00:05 GMT
Page: , version: 1 on Sun Nov  2 17:02:09
2003 by BrunoDumon

New page created:
+ This page contains information on the default XSLT's provided by Woody, and the __wi:styling__
directives they support. Be sure to first read about the [template transformer|WoodyTemplateTransformer].
+ There are basically 3 XSLT's:
+ * __woody-field-styling.xsl__: contains templates that style individual widgets, i.e. templates
that translate wi:field, wi:booleanfield, wi:action, etc. to HTML.
+ * __woody-page-styling.xsl__: contains templates for building high-level page layout effects,
such as tabbed panes.
+ * __woody-samples-styling.xsl__: this stylesheet combines the previous two and adds necessary
pieces to the html/head tag (js and css references).
+ From the sitemap you only need to reference the last one, for example as follows:
+ {{{
+   <map:transform src="context://samples/woody/resources/woody-samples-styling.xsl"/>
+ }}}
+ !!!wi:styling options
+ !!wi:field (without selection list)
+ By default all attributes on the wi:styling element will be copied onto the resulting HTML
<input> element. Thus you can put e.g. type, class, style and size attributes on it.
For example:
+ {{{
+ <wt:widget id="myfield">
+   <wi:styling size="50" class="kinky"/>
+ </wt:widget>
+ }}}
+ Some values for the type attribute will cause special effects:
+ * __type="textarea"__: creates a <textarea> instead of an <input> element
+ * __type="output"__: outputs the field's value as uneditable text
+ * __type="date"__: will put a little icon next to the input field that, when clicked upon,
shows a calendar popup. Using an attribute named format you can specify the date format (default
is yyyy-MM-dd)
+ Adding an attribute __submit-on-change="true"__ on wi:styling will cause an automatic form
submit when the field's value changes.
+ !!wi:field (with selection list)
+ By default, a field with a selection list is rendered as a dropdown box.
+ Adding an attribute __list-style="radio"__ on wi:styling produces a vertical list of radio
buttons instead. Add list-orientation="horizontal" to have a horizontal list of radio buttons.
+ Adding an attribute __list-style="listbox"__ on wi:styling produces a selection list, use
the attribute list-size to specify its size (default 5).
+ !!Other widgets
+ Not yet documented here, but don't be afraid to look at the source of the {{woody-field-styling.xsl}}
+ !!!High-level styling with wi:group
+ No documentation yet, checkout the samples and the source of {{woody-page-styling.xsl}}.

Page: , version: 15 on Sun Nov  2 16:17:14 2003
by BrunoDumon

- * [The woody template transformer|WoodyTemplateTransformer]
?       ------

+ * [The template transformer|WoodyTemplateTransformer]
+ * [XSLT|WoodyXSLT]

Page: , version: 1 on Sun Nov  2 16:10:03
2003 by

New page created:
+ !!Frequently Asked Questions
+ !My form keeps being redisplayed though it doesn't show any errors.
+ This is probably because you have some required fields in your form definition which you
forgot to put in the form template.
+ !How can I make the requiredness of a widget depend on the value of other widgets?
+ Currently you can't. The solution is to make the widget not required, and do this check
in custom code or using a validation rule.

Page: , version: 21 on Sun Nov  2 16:55:21
2003 by StavrosKounis

+ *I'd like to see a complete howto run cocoon under JBuilder or Sun ONE Studio.

View raw message