Without providing complete academic information about Facelets, here is what it gives you:
- Firstly, the ability to create reusable HTML code that you write yourself: this is not possible with JSF (pre-v2). Facelets gives you more control over the results of your web pages.
- In some editions, it was shown that you can view parts of your page too, but this is actually impractical, since there are many states on a web page, of which only the initial bare version is visible in the preview.
- If you intend to use JSF for a public website, Facelets is essential for SEO, given that with JSF you have no control over what comes out of the standard JSF components.
- Secondly: templates. The ability to define HTML blocks (read: Facelet compositions) that can be reused with tags such as ui: define and ui: insert.
There are other advantages, but right now you should know that these two are the reasons for using Facelets over JSF. In addition, JSF 2.0 contains a modified version of Facelets by default.
facelets benefits: http://www.ibm.com/developerworks/java/library/j-facelets/
source share