cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <d...@c-ware.de>
Subject AW: AW: [CForms] Accessing date-type widget and formating it's output for usage as attribute-value
Date Sun, 23 Oct 2005 11:31:23 GMT
I am inside a repeater but I really like your Tipp ... didn't think of that
;)

-----Ursprüngliche Nachricht-----
Von: Mark Lundquist [mailto:ml@wrinkledog.com] 
Gesendet: Freitag, 21. Oktober 2005 18:01
An: users@cocoon.apache.org
Betreff: Re: AW: [CForms] Accessing date-type widget and formating it's
output for usage as attribute-value


On Oct 21, 2005, at 6:53 AM, Christofer Dutz wrote:

> If I use exactly the same code as you I get 
> "[Lorg.w3c.dom.Node;@28e230" as
> value of ${dateFormatted}

ahh.... right, OK.  I guess it would do that.

Well then, the next thing that comes to mind would be to do the 
formatting in the flowscript, using SimpleDateFormat (or, I like to use 
org.apache.commons.text.FastDateFormat) and passing the result in as 
its own parameter.

That's relatively convenient as long as you are not inside a repeater.  
If you are, then you might try passing an instance of SimpleDateFormat 
as a JXTG parameter and then calling it in the template

	<foo bar="${dateFormat.format (someDateInARepeaterWidget)}">

GL,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message