dev@woodstock.java.net

RE: Supporting facelets

From: Jason Lee <lee_at_iecokc.com>
Date: Mon, 12 Mar 2007 09:00:15 -0500

With this change, then, the standard JSF and JSP files (.tld,
faces-config.xml) will be generated by passing in one factory to the
processor, and the Facelets support file (webuijsf.taglib.xml) will be
generated in a second instantiation of the processor, either in the same
task or a different one? What if one were able to pass in a list of
factories to apt, and do everything in one pass? I'm not sure I see the
value in making the Facelets support generation a separate tasks. IMO,
the file should awalys be generated (thus generating should be made as
painless as possible). If the end user isn't using Facelets, there is
no run-time dependency on Facelets jars; there is only 21.4KB of disk
space "wasted."

-----
Jason Lee, SCJP
Senior Software Engineer
http://www.iec-okc.com
 

> -----Original Message-----
> From: Gregory.Murphy_at_Sun.COM [mailto:Gregory.Murphy_at_Sun.COM]
> Sent: Sunday, March 11, 2007 10:18 AM
> To: dev_at_woodstock.dev.java.net
> Subject: Supporting facelets
>
> To fix Issue #3, which asks that we support generating code
> that works with Facelets, I am proposing a custom generator factory.
>
> Attached is a new NetBeans project, which builds a generator
> factory suitable for passing to the annotations processor.
> This generator factory extends the default factory, but
> returns a special implementation of TagLibFileGenerator,
> which will generate a taglib file that meets the requirements
> of Facelets. All other files are generated as before.
>
> To try it out: unzip the project ./annotations, build, and
> copy the library into ./webui/annotations/lib. Then modify
> the webui build file:
> add a library definition for the new library:
>
>
> <path id="annotation-processor.jars">
> ....
> <pathelement
> location="${lib.annotations}/facelets-factory.jar"/>
> ....
> </path>
>
> And then pass the new generator factory as an argument to the
> annotation
> processor:
>
> <exec executable="${apt.home}/bin/apt">
> ....
> <arg value="-A
> generatorfactory=com.sun.faces.mirror.generator.FaceletsGenera
> torFactory"/>
> ....
> </exec>
>
> If the generator is an acceptable solution, we still need to
> decide how
> to support building facelets, e.g. via an alternate build
> task or a an
> alternate build file.
>
> // Gregory
>