When I've thought of this, I've always imagined that really complex renderers would end up requiring Java code, and that really simple renderers, well, aren't that hard to write in the first place, and would be much slower when written that way. At that point, I gave up and worked on things I was sure would work. :)
Templating a la Facelets has seemed like a pretty good middle ground for assembling on-the-fly components. That said, I'd be absolutely thrilled to proven wrong! So I guess two questions: - Have you had a chance to benchmark the Freemarker-coded outputText against the one in MyFaces? - Any chance of tackling a complex component so we could see what it looks like? -- Adam On 6/28/07, Jurgen Lust <[EMAIL PROTECTED]> wrote:
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
