Page: http://wiki.cocoondev.org/Wiki.jsp?page=Main , version: 214 on Fri Jul 25 16:41:04 2003 by BrunoDumon
+ ** Various updates to the [Woody] pages. -- [BD|BrunoDumon] Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyReference , version: 4 on Fri Jul 25 16:37:29 2003 by BrunoDumon - [[Nothing here yet] + The string datatype corresponds to the java.lang.String class. + + Strings obviously don't support any convertors, since there's no purpose in converting a string to a string. - [[Nothing here yet] + The long datatype corresponds to the java.math.Long class. + + It has similar convertors as the decimal datatype (see below). + + !!decimal datatype + + The decimal datatype corresponds to the java.math.BigDecimal class. + + It supports the following convertors: + + !formatting + + This convertor uses the java.text.DecimalFormat class (or com.ibm.icu.text.DecimalFormat class if it is present in the classpath). This means it can perform locale-dependent, pattern-based formatting of numbers. + + Configuration pseudo-schema: + {{{ + <wd:convertor type="formatting" variant="integer|number|currency|percent" ? > + <wd:patterns> + <wd:pattern>....</wd:pattern> ? + <wd:pattern locale="lang-COUNTRY">....</wd:pattern> * + </wd:patterns> ? + </wd:convertor> + }}} + + The variant attribute and patterns element are optional. By default, the "number" variant is used (or for longs: the "integer" variant). + + You can supply either a locale-independent formatting pattern or locale-dependent formatting patterns. See the [javadoc of the DecimalFormat|http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html] class for the supported pattern syntax. Woody will always use the pattern that is most specific for the current locale. + + !plain + + This convertor is not locale-dependent. It shows the full precision of the number and uses dot as the decimal separator. - The date datatype corresponds to the java.util.Date type. This means it can be used both for dates as times. ? ^^^^ + The date datatype corresponds to the java.util.Date class. This means it can be used both for dates as times. ? ^^^^^
