简体   繁体   中英

inner working of JSF 1.2

I'm trying to understand the inner workings of JSF 1.2 sun implementation.

I have the following questions.

  1. It is stated that Lifecycle class manages the processing of the entire lifecycle of a particular JavaServer Faces request. It has execute and render methods but its a abstract class. How is it really implemented?

  2. In this blog, he states that the ViewHandler will eventually call the following: stateManager.saveView(context); Is this correct? I couldn't find anywhere this line of code.

  3. In which class would I find the code that parses the JSF tags and created component tree, (xml -> tree)?

  4. In which class would I find the code that does the reverse of (3) ie renders the component tree. (tree -> xml)?

It would also be infinitely great if someone could point me to any resource that provides explanation about JSF 1.2 implementation.

It's been a few years since I've been in the guts of JSF 1.2, but if memory serves the class implementing Lifecycle was always LifecycleImpl.

Regarding the conversion between xml->tree and tree->xhtml (for me, anyways), I always thought that was done by the Components / Renderers / Converters. Based on a tag, a Component is created and populated in the tree. The Renderer attached to the Component (based in the tag definition) is responsible for rendering the output (by default html, but you can have multiple renderers attached to a component based on the desired output), and the Converter is responsible for the String <-> Object conversions.

I always had good luck reading the source (can be found at http://javaserverfaces.java.net/download.html ), although it took a few tries to get my head around some of it.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM