On Mon, 2004-11-08 at 14:10 +0100, Leszek Gawron wrote:
> Something like ${bean.startDate} or <jx:out value="${bean.startDate}"/> would 
> use default renderer. Something like ${bean.startDate?class=emph} <jx:out 
> value="${bean.startDate}" styling="emph"/> would point that other convertor 
> is 
> needed.

I've implemented something similar to this and would be very happy to
donate it.
http://www.mail-archive.com/dev@cocoon.apache.org/msg23989.html

It's basically a converter that sits on top of common-el's expression
evaluator.

You can have a template that looks like this for example

<p>Default conversion of date: ${date}</p>
<p>Short conversion of date: ${date#short}</p>

The expression evaluator evaluates the ${date} to a Date. It then looks
up its configuration for a Date -> String converter. Different
converters between the same class types are differentiated by what comes
after #.

// Jonas

Reply via email to