cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Larson <timlarsonw...@yahoo.com>
Subject [cforms] default values and locale
Date Mon, 22 Dec 2003 17:25:54 GMT
I was just adding a "default" attribute to the Field widget, but
then I started thinking...

For a Field widget a default value could be specified as either an
attribute or as the contents of a new element (e.g. <wd:default/>).
Which do you think is better, and what would be a good name?
I lean toward:
  <wd:default>
    <wd:value>Put default value here</wd:value>
  </wd:default>
With this syntax we could also allow setting default values for
MultiValueField's by just adding more <wd:value> elements.

The default value in the definition is specified as a string, which
must be interpreted according to some locale to be converted to the
actual value.  Because the locale is relative to the definition file
rather than to a client, the string to value conversion can happen
at definition load time, saving processing during form creation.

Also, what should we do if the default value should vary based on the
client's locale?  For this use case should the default use i18n
substitution and string to value conversion at form creation time?

Keeping in mind that i18n affects when the default value is processed,
how should we mark or notice when it is requested?

WDYT?
--Tim Larson


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

Mime
View raw message