myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ganesh <gan...@j4fry.org>
Subject Ajax View Reload
Date Thu, 23 Dec 2010 07:55:06 GMT
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

Mime
View raw message