cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: Garbage or The Quest for the Perfect Template Language
Date Tue, 05 Aug 2003 18:59:55 GMT
Christopher Oliver wrote:
> What was your expression?


where "registrazione" is an instance of

public class Registrazione {

	private java.util.Date dataCompilazione;

	public java.util.Date getDataCompilazione() {
		return dataCompilazione;

Actually, at runtime the "dataCompilazione" member points to an instance 
of "java.sql.Timestamp" (implements java.util.Date).

If I just do <jx:out value="#{registrazione/dataCompilazione}"/>, I get 
the default string representation of the date, so by itself the 
expression does evaluate to a Date.

> 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)}'/>

I'll try this option tomorrow, if I can't solve my problem with XPath.


View raw message