1. Richfaces has an own viewhandler and an own Renderkit, it relies on the jsf faces servlet as front controller. Is that correct?
RichFaces do not use own Renderkit. Not for standard JSF, nor for any other third party components. All components uses their own renderers (ie. have the original behaver)
2. RichFaces viewhandler is pre chained to the facelets viewhandler. So Richfaces does some "magic" and then forwards it to the facelets viewhandler?! Is that correct?
Yes, Richfaces does some "magic". It puts itself in front of the view handlers chain.
3. Why are components like tomahawk not affected when using richfaces? Are they rendered by richfaces or myfaces? How exactly is richfaces integrated in the renderprocess?!
As I mentioned above, all components (including MyFaces' ones) are rendered by the original renderers. On the sixth phase (Render Respose phase) RichFaces make a traversal of the component tree, check component is required for rendering, call its own renderer and put the result into the response package.
4. According to the article under https://blueprints.dev.java.net/bpcatalog/ee5/ajax/usingJSFwithAJAX.html
Which concept is behind RichFaces? Does Richfaces use phase listeners? How is it integrated in the jsf lifecycle?
RichFaces used to use phase listener approach some time ago, but not now. This approach does not work when we speak about complex environment that included other frameworks like Seam and/or Trinidad. Such frameworks widely use phase listeners for creating or manipulating with own contexts. So, using the phase listener approach for the Ajax rendering purpose does not guaranty that context actuality.
In contrast, RichFaces uses viewhandler approach. Its renderView method guaranties that the context is ready.
P.S. Those are the draft of the documents I wrote some time ago. They might be out-of-date already in some points, but still helpful for your framework exploration:
Thanks alot for that Sergey, these docs helped me alot. ViewHandler approach sounds good and explains why richfaces is very compatible to standard JSF components and even third party components. A good concept in my oppinion...
again I have some questions to understand the Richfaces architecture better:
1. I would like to know when and where is AjaxContext initialized. I know that the FacesContext is created by the FacesServlet but as there is no AjaxServlet, which object is responsible for creation and when?
2. Does AjaxContext overrides FacesContext or do they exist parallely?
3. Where is AjaxViewRoot stored and how can I retrieve it? I did not found a method like AjaxContext.getAjaxViewRoot(). I thought it was stored in the AjaxContext object...
I hope Sergey or sw. else that know the architecture well can help again.
It is really important for me to understand it, thanks alot in advance!
Is there any knowledge out there, that sw. wants to share?!
It would be really helpful!