That is a nice idea ... I'm actually doing it for GSoC :) ... I haven't got
too far because I never wrote a renderkit before but I'm planning on writing
renderers this way for all basic myfaces components and the tomahawk ones as
well ...

http://code.google.com/soc/asf/appinfo.html?csaid=FE280ED4B49C1166

I'll take a look at what you've put in the sandbox ... It will probably help
allot..

On 6/29/07, Catalin Kormos <[EMAIL PROTECTED]> wrote:



---------- Forwarded message ----------
From: Jurgen Lust < [EMAIL PROTECTED]>
Date: Jun 28, 2007 9:57 PM
Subject: Renderkit using Freemarker templates
To: [email protected]

Hi,

I think most people will agree that writing Renderers for JSF components
using the standard tools, i.e. ResponseWriter.startElement and
ResponseWriter.writeAttribute etc., is not very straightforward or
productive, especially when creating complex components. If you take a
look at org.apache.myfaces.custom.schedule.ScheduleDetailedDayRenderer ,
you'll know what I mean :)

One of the great things about Dojo is that you can create templates for
your components. Inspired by this, I tried to do something similar for
JSF renderers, using Freemarker. I put it in the sandbox, and wrote a
replacement HtmlOutputTextRenderer based on it. I know the outputText is
a bad example for this, but for complex stuff, this could be really
useful.

What do you think?

Jurgen

Reply via email to