Rise of the Faces Trace
April 14, 2006 8 Comments
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.
UPDATED: FacesTrace is released at sourceforge, the web site of the project is http://facestrace.sourceforge.net