cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: Styling fi:field widgets for times
Date Thu, 01 Jul 2004 22:01:22 GMT
On 01.07.2004 21:42, Colin Paul Adams wrote:

>      <fd:field id="start-time">
>         <fd:label>Start time</fd:label>
>             <fd:datatype base="date">
> 	    <fd:convertor datatype="date" variant="time" type="formatting"/>
> 	 </fd:datatype>
>      </fd:field>
> With a binding of:
>      <fb:value id="start-time"  path="@time" >
> 	<fd:convertor datatype="date" variant="time" type="formatting"/>
>      </fb:value>
> The processing chain is picking up the date dataype somewhere, and
> adding an <fi:styling type="date"/> (I think) element.
> Can someone tell me where this is done?

The datatype implementation does it. Here the datatype is date, so:
which extends AbstractDatatype, from where the implementation of this 
method is taken:

> The calendar sample stylesheet is then putting in a date-picker popup,
> which in this case is far from appropriate.

That's correct, the variant would in this case also interesting.

> As far as I can see, there is no fi:styling option corresponding to 
> datatype="date" variant="time" (please tell me I'm wrong!).

AFAIK that's correct too.

> I guess I can add fi:styling elements to my template, to override this
> behaviour. Simply adding a class and tailoring the CSS file should be
> sufficient for presentation.

Yes, it should work. I hope fi:styling information in template overrides 
the one from the form model.

> I'm not sure how to go about validation though.

You should provide a pattern, the rest is (or should be?) like normal date.

> Is the full syntax of fi:styling documented somewhere? I can find
> limited documentation at:
> but it is far from exhaustive. I think perhaps it depends entirely on
> the stylesheets used to interpret it?

Exactly. You can write everything into your template, most of it is just 
copied to the output.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message