FaceletsVersusJsfFramework

Notes on Facelets framework integration with JSF framework

Choosing Glassfish v3 sever (for Web Application) which suports JSF 2.0 with Facelets does not necessarily mean that user wants to develop JSF application. That's why we cannot automatically preselect JSF framework or make any assumptions/restrictions based on chosen server. User may want to still build Struts or Spring app or may want to develop JSF application using MyFaces or using older version of JSF (JSF1.2 with Facelets 1.1.14). That means JSF framework should stay more or less as is in NB6.7 and user should be in charge of what and in which version will be used.

JSF and Facelet frameworks are basically about the same and should be merged. That is Facelets framework should be removed and JSF framework should be enhanced to accomodate for Facelets:

Libraries panel should (ideally) list following libraries user could choose from (in given order):

  • JSF 2.0 (includes Facelets)
  • JSF 1.2
  • JSF 1.2 + Facelets 1.1.14
  • MyFaces 2.0 (once and if available)
  • MyFaces 1.2 + Facelets 1.1.14
  • MyFaces 1.2

Libraries panel should instead of "Do not append any library" say "Use default library which comes with Server (JSF X.X)".

Configuration panel should dynamically enable Facelets options if selected JSF library contains Facelets. These Facelets options should be grouped under a Facelets UI group which is always visible but can be completely disabled. Double check that all of existing Facelets options are still useful - some of them like Faces Suffix or Faces Servlet Mapping look a bit useless as they are not editable.

Advantage of this solution (merging Facelets framework with JSF one) is that it is usable both for JEE6 and JEE5.

JavaServer Faces framework changes:

  • add JSF 2.0 library
  • generate different welcome page if Facelets are enabled
  • add detection of Facelets in a library classpath
  • communicate via ExtenderController.getProperties what JSF library (if any) server comes with
  • etc.

Proposed UI

Libraries Panel

Image:Libraries_FaceletsVersusJsfFramework.png

Configuration Panel

Image:Config_FaceletsVersusJsfFramework.png

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo