Kiss My App

Friday, November 10, 2006

JSF Facelets Resurrected!

After a long hiatus away from open source with the wedding/work, I've started to working on Facelets again!

Contrary to what I said last spring/summer around Avatar, I've decided to continue on the 1.2 release of Facelets which has Avatar fully integrated for alternate/partial communication with JSF from JavaScript. The DynaFaces stuff isn't picking up in popularity and the code base has grown way too foreign to me from the original development done (losing/changing things included with Avatar).

Some of the new features include:

  • A JavaScript library for sending Faces events up to the server for partial views and supplementing AJAX JS widgets

  • Listener/Observer JS functionality with Faces events

  • The ability to define static resources within your taglib.xml to supplement your components

  • The simple convention of exposing FACES-INF on your ClassLoader to the public web. This means you can drop in simple JS/GIF/JPG/PNG images and reference them from within your HTML files

  • A ClientWriter to supplement GUI changes from backing beans or UIComponents, details here.

Configuration wise, one of the biggest changes was that it now requires a Filter to be mounted in your web.xml to supplement AJAX requests, including static resources. I've also peeled out the configuration stuff from FaceletViewHandler for the most part such that it can be lazily instantiated by the FaceletViewHandler or the FaceletFilter.

Anyways, here's a link to download. I've tested with the J1 demo and the Hangman demo. Note, the 1.2 release branch will only work with JSF 1.2-- which is fine by me because the RI 1.2 is gotten crazy fast compared to older releases. It's worth upgrading to the nightlies if you are running JSF 1.2.