May 19th, 2009 by Lincoln Baxter III

Facelets vs. JSF2 & EzComp

Several things that make life painful with Facelets are fixed with JSF2 & EzComp. Take a look at some of the nicer things to come:
  • You can pass a value-binding into a component.
  • You can assign a listener to a specific input field/button inside a custom component.
  • You can pass facets into components and use them conditionally.
  • You can attach validators to specific input fields/buttons of components.
  • You can pass nested children into components and use them conditionally.
  • In EzComp, namespaces are created automatically by convention — no more taglibs
  • You can include CSS or JS files from packaged jars — a big issue when using shared libraries of components.
  • Standard support for Ajax — no javascript required (<f:ajax />).
Without all of this, with JSP or Facelets 1.2, you eventually need to write components in Java, which means a lot of time-consuming work. Having gone down that road, and then experienced EzComp, I’ve seen a time-saving of about 10x, with a lot more power to create really interactive and rich components through Ajax. Instead of 3-4 files required to make a component, you now have 1 — the component. Moral of the Story: If you are considering an upgrade from JSP, go right to JSF2 — it’s stable enough to begin development. Also, be sure to check out the developer blags for more updates on JSF2:

Posted in JSF

3 Comments

  1. Amr Gawish says:

    This is a great news, I hope JSF2.0 will come soon, and more important for application servers and web containers to be able to deploy its applications without extra configurations!

  2. Jason Lee says:

    Amr Gawish, Mojarra 2.0 Beta was just released. It should be extremely stable, certainly enough to begin development work on it. Mojarra 2 has been in the GlassFish v3 trunk for quite some time, and we have no major issues that I’m aware of. Furthermore, Mojarra 2 is available for GF v2, which, although it may not be your container, shows that it runs quite nicely in a a Java EE 5 environment, so Tomcat 6 (and perhaps 5), JBoss 5, etc should run Mojarra/JSF 2 very nicely. If you do run into issues, please file an issue on our tracker.

    Thanks, and have fun. πŸ™‚

    Jason Lee

  3. Eric Gilbertson says:

    I can confirm that JSF2.0 applications do deploy/run on Tomcat 6.0.20 out of the box.

    HTH,

    Eric G.

Leave a Comment




Please note: In order to submit code or special characters, wrap it in

[code lang="xml"][/code]
(for your language) - or your tags will be eaten.

Please note: Comment moderation is enabled and may delay your comment from appearing. There is no need to resubmit your comment.