It's not a secret anymore!
The moose likes JSF and the fly likes Component tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Component tree" Watch "Component tree" New topic

Component tree

Shahir Deo
Ranch Hand

Joined: Mar 19, 2013
Posts: 80

Hi Guys,

I am New to JSF Framework , I came across Component Tree , I understood That but how jsf creates component tree?
and What is Facescontext?

Knowledge enlivens the soul.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

JSF is a very pure implementation of the Model/View/Controller architecture. In JSF, you design the Views using View Template Language (xhtml) - which is also known as View Definition Language. You design the Models as Backing Beans. The Controllers are part of JSF itself and you almost never write a Controller in JSF.

The Master Controller for JSF is the FacesServlet. It not only binds together the Models and Views, it accepts an incoming URL, strips it down to extract the View Resource Path ("filename") of the corresponding View, then it compiles the View Template to produce the Component Tree, which is the reference object for all of the other stages in the JSF lifecycle.

Note that once the Component Tree has been constructed, it is saved for processing postbacks from the client. This saves time. It also, however, means that the URL and the View Resource don't track in perfect synchronization, which is a feature of JSF that annoys many people.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Component tree
jQuery in Action, 3rd edition