Posts

Showing posts from November, 2011

jsf2 – splitter composite component

I was playing with the composite component capability of jsf2. It essentially allows you to build up “templates” of reusable layouts and content. One component that I did  not find in the jsf component library I am using (richfaces) is a splitter. I know its in the openfaces component library, but I was wondering how easy it would be to create something quickly. So, without regard for colors and layout requirements, I put together: 1: <? xml version ="1.0" encoding ="UTF-8" ? > 2: <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > 4: < ui:component xmlns ="http://www.w3.org/1999/xhtml" 5: xmlns:h ="http://java.sun.com/jsf/html" 6: xmlns:f ="http://java.sun.com/jsf/core" 7: xmlns:ui ="http://java.sun.com/jsf/facelets" 8: xmlns:a4j ="http://richfaces.org/a4j...

JSF2.0 and web applications

Well…after poking around a bit on web frameworks I decided to take a deeper look into JSF2.0. Why? Wasn’t the 1.x series of JSF standards pretty brutal? Well yes, from the looks of it. JSF2.0 is, however, a nice component based web framework. Oracle has ADF, JBoss has RichFaces, and there are many component libraries available for JSF. Even the ZK framework (which has a heritage in the GWT thinking) has some taglibs to leverage inside of JSF if you want to. Why JSF? Well, it has a nicely defined lifecycle, it allows you to bundle things up into a declarative syntax nicely and the available toolkits look pretty good. You can avoid some deeper tinkering with javascript if you like. Because JSF2.0 is ajax enabled, you can still get good partial page rendering support when you need it. A couple of the parts that I like about JSF is that it has: Templates: You can define page templates in xhtml and reuse them. Composite Components: It has composite components that allow you to build wh...