Coming Up for Air

JSFTemplating Meets Facelets

Wednesday, April 04, 2007 |

I could be wrong, but I think it’s safe to say that most people don’t know about JSFTemplating, which is a pity, as it’s a pretty nice alternate ViewHandler implementation from Ken Paulsen, GlassFish admin console architect. One of the coolest features, I think, is its introduction of templating events (e.g., one can attach a beforeEncode event to a component on a page and have a handler method fire before that component is encoded). The first comment I hear, though, is usually something about template syntax, and it does seem a bit foreign with things like <!if $attribute{in} & ! (#{in} = abc) > and <span class="code">#include /header.inc</span>. That’s where I come in.

Ken and I got to talking about the project, and, given my experience with Facelets and my involvement with the JSF RI (not to mention my apparent inability to say no :), he asked me if I would be interested in writing a Facelets-compatible format for JSFTemplating, which is another really cool feature of the library: the "formats" are pluggable. That is to say, when you write a web page in a given format, the format handler (technically, a LayoutDefinitionManager) translates the page into a LayoutElement tree, which the core of JSFTemplating then processes to create the UIComponent tree that JSF needs to see. The technical challenge intrigued me, so I agreed to take it on, giving me another lunch time project. :P

The short-term goals of the effort are to create a format that is functionally equivalent to the templating in Facelets. That is to say, we intend to duplicate the functionality of the ui:* "components" in Facelets, while adding support for the event model that JSFTemplating provides. Once that’s done, I’d like to take a look at some of the more advanced features exposed via the taglib.xml, but we’re taking Dr. Leo Marvin’s advice and taking baby steps. :)

For those interested in tracking the progress, the source code is available in the JSFTemplating CVS tree, which you’ll be able to see once java.net finishes its massive upgrades. ;)

Search

    Quotes

    Sample quote

    Quote source

    About

    My name is Jason Lee. I am a software developer living in the middle of Oklahoma. I’ve been a professional developer since 1997, using a variety of languages, including Java, Javascript, PHP, Python, Delphi, and even a bit of C#. I currently work for Red Hat on the WildFly/EAP team, where, among other things, I maintain integrations for some MicroProfile specs, OpenTelemetry, Micrometer, Jakarta Faces, and Bean Validation. (Full resume here. LinkedIn profile)

    I am the president of the Oklahoma City JUG, and an occasional speaker at the JUG and a variety of technical conferences.

    On the personal side, I’m active in my church, and enjoy bass guitar, running, fishing, and a variety of martial arts. I’m also married to a beautiful woman, and have two boys, who, thankfully, look like their mother.

    My Links

    Publications