14.07.2013 Views

Contents - Cultural View

Contents - Cultural View

Contents - Cultural View

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Facelets 118<br />

Facelets<br />

Stable release 1.1.15 / November 24, 2009<br />

Preview release 1.2-dev / November 10, 2006<br />

Written in Java<br />

Operating<br />

system<br />

Cross-platform<br />

Size 5.07 MB (archived)<br />

Type Web Framework<br />

License Apache License 2.0<br />

Website http:/ / facelets. dev. java. net/<br />

Facelets is an open source web framework under the Apache license and the default view handler technology (aka<br />

view declaration language) for JavaServer Faces (JSF). The framework requires valid input XML documents to<br />

work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree,<br />

reflecting the view for a JSF application.<br />

Although both JSP and JSF technologies have been improved to work better together, Facelets eliminates the issues<br />

noted in Hans Bergsten's article "Improving JSF by Dumping JSP" [1]<br />

Facelets is similar enough to Apache Tapestry to draw comparison. In fact, Tapestry was well ahead of its time when<br />

it first came out , and Facelets does draw on some of its ideas. The project is conceptually similar to Tapestry's,<br />

which uses the jwcid attribute, while Facelets uses the jsfc attribute combined with proper namespaces to convert<br />

HTML elements into the corresponding JSF components. Also, there are some similarities to the Tiles framework<br />

regarding support templating as well as composition.<br />

Initially, Facelets was available as a separate, alternative view declaration language for JSF 1.1 and JSF 1.2 which<br />

both used JSP as the default view declaration language. Starting from JSF 2.0, Facelets has been promoted as the<br />

default, and JSP has been deprecated as a legacy fall back [2] .<br />

Example<br />

The following example shows an XHTML template for taking the use of Facelets component-aliasing. The jsfc<br />

attribute is used here, shows which tags to replace when compiling the page with the corresponding JavaServer<br />

Faces components.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!