You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Ganesh <ga...@j4fry.org> on 2010/12/23 08:55:06 UTC
Ajax View Reload
Hi,
The c:if testcase in org.apache.myfaces.view.facelets.tag.jstl.core.JstlCoreTestCase.testIf() contains code to trigger a component tree rebuild for jstl tags:
// make sure the form is there
e.setManagement(true);
vdl.buildView(facesContext, root,"if.xml");
UIComponent c = root.findComponent("form");
Assert.assertNotNull("form is null", c);
// now make sure it isn't
e.setManagement(false);
facesContext.setViewRoot(facesContext.getApplication().getViewHandler()
.createView(facesContext, "/test"));
root = facesContext.getViewRoot();
vdl.buildView(facesContext, root,"if.xml");
c = root.findComponent("form");
Assert.assertNull("form is not null", c);
I'm trying to use this technique in an AJAX action (because I've got a recursive page structure which requires a c:forEach and an AJAX request to toggle parts of it).
Effect: MyFaces is not sending an AJAX response at all any more and comes back with a malformedXML error. Is this a bug or does the above code need to be changed for AJAX requests?
Best regards,
Ganesh