cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: Garbage or The Quest for the Perfect Template Language
Date Wed, 06 Aug 2003 07:09:20 GMT
Christopher Oliver wrote:
> By the way JXTemplateGenerator adds the capability to call Java 
> constructors to Jexl, so you can also do this:
> 
>  <jx:out 
> value='${java.text.SimpleDateFormat("dd/MM/yyyy").format(someDate)}'/>

OK, this works:

${java.text.SimpleDateFormat("dd/MM/yyyy").format(date)}

But this does not:

${java.text.SimpleDateFormat("dd/MM/yyyy",java.util.Locale.ITALIAN).format(date)}

and gives the following error:

The choice of Java constructor java.text.SimpleDateFormat matching 
JavaScript argument types (string,null) is ambiguous; candidate 
constructors are: (java.lang.String,java.text.DateFormatSymbols), 
(java.lang.String,java.util.Locale)

Problem with static members?

	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


Mime
View raw message