Rise of the Faces Trace

JSF has no built-in client side validation that is why I’ve created a client side validation library for JSF. Also one of the things missing in JSF is an utility for debugging the flows. With the same state of mind, I’ve realized that it would be cool to create a visual debugger. The lifecycle is well defined and the application developer’s code usually executed at invoke application phase. JSF takes care of the other stuff like conversion,validation and model update.

When something wrong happens I dont think it is tricky to understand the cause of the problem. In order to bring this support to JSF me and my colleague Yigit created an open source project called “Faces Trace”, a library collecting information in a request and presents the whole info using a simple custom component. The usage is as simple as placing <ft:trace /> at the end of the page. Here are some features that we come up with,

* Displaying the execution times of each phase in ms.
* Visualizing the JSF flow using a schema. The phases executed are shown as green, ones that are not are gray, also the phase which caused an error takes the color red.
* Displaying several information in scopes like Application, Session, Request, Params, InitParam and cookies. Using this feature will enable you to see how the application is configured, what is located in session, request, etc and what is posted from the page.
* Since a JSF view is stored in a tree, I thought it would be interesting to map this to a dhtml tree that can be traversable. The dhtml tree contains several information like, id, type and if the component is a value holder, the value information. More info on tree dhtml component tree is here.

Some screenshots showing facestrace in action.

Free Image Hosting at www.ImageShack.usFree Image Hosting at www.ImageShack.usFree Image Hosting at www.ImageShack.usFree Image Hosting at www.ImageShack.usFree Image Hosting at www.ImageShack.us

UPDATED: FacesTrace is released at sourceforge, the web site of the project is http://facestrace.sourceforge.net

8 Responses to Rise of the Faces Trace

  1. Really cool stuff. I hope license will be a liberal one, like Apache 2.0 license.


  2. Cagatay Civici says:

    Yes it is pure Apache 2.0 this time:)

  3. Frank Russo says:

    This is cool. The Facelets guys have something similar built into Facelets, although, it’s only the component tree. The phase debug info is a nice add-on. They should look at this as something to add for Facelets…

  4. Tim Howland says:

    This looks really great. Is there any way to tie in a log4j appender? Might be interesting to see what was happening at the business tier, and there’re so many log4j tools out there…

  5. That is a cool idea Tim, thanks for the feedback. It’ll be great to add an appender support if we can do it. Presenting the logs to the user will be very useful.

  6. Mert says:

    chainsawFaces Component! :=)
    thanx to Tim…pointed out a good requirement.

  7. The logging mechanism is ready, now facestrace displays the logs in the application using it’s own log4j appender.I guess it is time to make a release.

  8. Cagatay Civici says:

    At last beta version 0.8.0 is ready and released at sourceforge.More info at:


%d bloggers like this: