Hi ,
OK , I haven't mentioned that, in the listener , when creating a new UIViewRoot I'm actually replacing the ViewId with a new ( dummy one ) . The process is like this : 1. A XmlHttpRequest arrives with the current viewId and "javax.faces.ViewState" parameter set . 2. JSF RESTORE_VIEW phase , restores the component tree ( view ) 3. I fetch the component using the id , create a new UIViewRoot , and add as child the previously fetched component ... And of course set the new UIViewRoot to the context . The thing is I would like just those components to pass through the JSF lifecycle . The only thing is that on render response they get replaced by the JSP components ( the actual JSP that the viewId is pointing to ) . I know i'm playing with the JSF engine in an "not-so-fine" manner , but if you would happen to have any suggestions to my aproach or alternate suggestions , please post your reply . Thanks , Victor Jan-Kees van Andel wrote: > > It looks like JSF doesn't recognize your request as a postback. > Take a look at a regular JSF form post to see what your request should > look like (hint: check out the javax.faces.ViewState field). > > Regards, > Jan-Kees > > > 2008/12/23 gibiman <[email protected]>: >> >> 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 >> -- >> View this message in context: >> http://www.nabble.com/Quite-advanced-JSF-problem-tp21142256p21142256.html >> Sent from the My Faces - Dev mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Quite-advanced-JSF-problem-tp21142256p21143468.html Sent from the My Faces - Dev mailing list archive at Nabble.com.
