locale = facesContext.getViewRoot().getLocale();
executeBeforeRender(facesContext);
executeBuildViewCycle(facesContext);
UIOutput testjs1_1 = (UIOutput) facesContext.getViewRoot().findComponent("testjs");
Assert.assertNotNull(testjs1_1);
testjs1_1.getAttributes().put("param1", "value1");
List<UIComponent> crlist = facesContext.getViewRoot().getComponentResources(facesContext, "head");
Assert.assertEquals(2, crlist.size());
for(UIComponent comp : crlist)
{
comp.getAttributes().put("param2", "value2");
}
executeViewHandlerRender(facesContext);
executeAfterRender(facesContext);
tearDownRequest();
setupRequest("/staticPageNoForm2.xhtml");
processLifecycleExecute();
executeBeforeRender(facesContext);
executeBuildViewCycle(facesContext);
Assert.assertTrue(facesContext.getViewRoot().getChildCount() > 0);
UIOutput testjs2_1 = (UIOutput) facesContext.getViewRoot().findComponent("testjs");
Assert.assertNotNull(testjs2_1);
// The state of the component should not be transferred.
Assert.assertNull(testjs2_1.getAttributes().get("param1"));
List<UIComponent> crlist2 = facesContext.getViewRoot().getComponentResources(facesContext, "head");
Assert.assertEquals(2, crlist2.size());
for(UIComponent comp : crlist)
{