webtier@glassfish.java.net

Re: Integrating chart generation engine into JSF 2.0

From: <webtier_at_javadesktop.org>
Date: Wed, 04 Nov 2009 08:52:25 PST

> AFAIK the resource mechanism is intended for static
> resources not dynamic ones, so for the charts I don't
> think you'll be able to use it.

The default ResourceHandler, as spec, only supports static, on-disk resources. With JSF being as extensible as it is, though, one can pretty easily override the ResourceHandler to support dynamic resources. I just did this very thing in Mojarra Scales for the sc:download component. Here are the links to the classes/files in question:

The Resource and ResourceHandler classes: http://kenai.com/projects/scales/sources/mercurial/show/main/src/main/java/com/sun/mojarra/scales/resource?rev=394
The Renderer: http://kenai.com/projects/scales/sources/mercurial/content/main/src/main/java/com/sun/mojarra/scales/renderer/FileDownloadRenderer.java?rev=394
faces-config.xml: http://kenai.com/projects/scales/sources/mercurial/content/main/src/main/resources/META-INF/faces-config.xml?rev=395

Hopefully, that all makes sense. If I can find the time, I hope to blog on the issue soon.
[Message sent by forum member 'jdlee' (jasondlee_at_sun.com)]

http://forums.java.net/jive/thread.jspa?messageID=370510