gibiman schrieb: > Hi , > I'm trying to develop custom AJAX components, and i'm facing some problems > on the JSF technology architecture . Pay attention ;) : > > An action on the page launches an XMLHttpRequest to a certain URL ( .jsf > suffix). My aim is to have the JSF engine process only a certain part of the > JSF tree , that is the part which contains the children of the component > that launched the request ( for example a tabPanel component generates an > ajax request , and only that certain tabPanel needs to be processed by the > JSF engine ) . > My aproach on the problem was to build a listener which would : > > after RESTORE_VIEW(1) > > 1. Fetch the UIComponent which launched the request > 2. Create a new UIViewRoot and set the new UIViewRoot to the facesContext > 3. Add the UICompononet fetched at step 1 as child to the UIviewRoot > 4. Invoke action specific behavior of the component - is ok to ignore this > part > > > The thing is that new UIViewRoot will get populated - by that i mean all the > previous children erased - on renderResponse phase with the JSP tags ( > naturally because the engine would return the corresponding viewId ) . If I > were to set an invalid viewId , e.g. a page that would not exist, than it > would return a 404 page not found response. > What are your opinions on my approach , and what alternate suggestions do > you have ? > Victor > What you are describing sounds to me very similar to the AJAX-related work in the upcoming JSF2.0 design. You might want to download the JSF2.0 spec and a JSF2.0 draft implementation and see if it suits your requirements. I have seen a lot of work going into a MyFaces 2.0 implementation, but not sure whether they have the ajax parts done yet: Sun Mojarra is almost certainly ahead at this stage.
Regards, Simon -- -- Emails in "mixed" posting style will be ignored -- (http://en.wikipedia.org/wiki/Posting_style)