Reputation: 21
JSF : As per Wikipedia, JSF is a Java specification for building component-based user interfaces for web applications.
Facelets : is an open source Web template system under the Apache license and the default view handler technology (aka view declaration language) for JavaServer Faces (JSF).
So my question is
Upvotes: 2
Views: 177
Reputation: 1109635
JSF can use any view technology. Previously this was JSP. Then it was Facelets. Via the ViewDeclarationLanguage
interface you can define and plug your own. Even a Java based one as Arjan Tijms ever blogged about: Authoring JSF pages using pure Java.
The view technology basically specifies the way how you define the JSF component tree. JSF builds the component tree (the UIViewRoot
instance) based on the view and then processes the request based on the component tree and then renders the response based on the component tree. This all happens completely independent of the view technology used.
Knowing that fact, the answers are more straightforward:
Facelets is just the default view technology of JSF (at least, since JSF 2.0). The component tree is not set in Facelets, it's set in UIViewRoot
instance.
Facelets just offers an easy way of defining JSF component tree via XHTML+XML, a markup language very suitable for embedding HTML code and converting to HTML.
Upvotes: 4