Package javax.faces.component

Examples of javax.faces.component.UICommand


        int indexDynHeader1_3 = content1.indexOf("End Dynamic Header", indexDynHeader1_2);
        Assert.assertNotSame(-1, indexDynHeader1_1);
        Assert.assertNotSame(-1, indexDynHeader1_2);
        Assert.assertNotSame(-1, indexDynHeader1_3);
       
        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
        submit(button);
        processLifecycleExecuteAndRender();
        Assert.assertNotNull(comp);
        Assert.assertEquals(2, comp.getChildCount());
       
View Full Code Here


        int indexDynHeader1_3 = content1.indexOf("End Dynamic Header", indexDynHeader1_2);
        Assert.assertNotSame(-1, indexDynHeader1_1);
        Assert.assertNotSame(-1, indexDynHeader1_2);
        Assert.assertNotSame(-1, indexDynHeader1_3);
       
        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
        submit(button);
        processLifecycleExecuteAndRender();
        Assert.assertNotNull(comp);
        Assert.assertEquals(2, comp.getChildCount());
       
View Full Code Here

       
        UIComponent ccpanel = facesContext.getViewRoot().findComponent("mainForm:ccpanel");
        Assert.assertNotNull(ccpanel);
        UIComponent ccinnerpanel = facesContext.getViewRoot().findComponent("mainForm:ccpanel:component");
        Assert.assertNotNull(ccinnerpanel);
        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:ccpanel:component:increment");
        Assert.assertNotNull(button);
       
        CheckActionEventBean checkBean = facesContext.getApplication().evaluateExpressionGet(facesContext,
                "#{checkActionEventBean}", CheckActionEventBean.class);
        int oldcount1 = checkBean.getActionListenerCount();
View Full Code Here

        for(UIComponent comp : crlist)
        {
            comp.getAttributes().put("param2", "value2");
        }
       
        UICommand submitButton = (UICommand) facesContext.getViewRoot().findComponent("mainForm:submit");
       
        executeViewHandlerRender(facesContext);
        executeAfterRender(facesContext);
       
        submit(submitButton);
View Full Code Here

       
        UIComponent ccpanel = facesContext.getViewRoot().findComponent("mainForm:ccpanel");
        Assert.assertNotNull(ccpanel);
        UIComponent ccinnerpanel = facesContext.getViewRoot().findComponent("mainForm:ccpanel:component");
        Assert.assertNotNull(ccinnerpanel);
        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:ccpanel:component:increment");
        Assert.assertNotNull(button);
       
        CheckActionEventBean checkBean = facesContext.getApplication().evaluateExpressionGet(facesContext,
                "#{checkActionEventBean}", CheckActionEventBean.class);
        int oldcount1 = checkBean.getActionListenerCount();
View Full Code Here

        processLifecycleExecute();
        locale = facesContext.getViewRoot().getLocale();
        facesContext.getViewRoot().getViewMap(true).put("viewItem", "someValue");

        executeBuildViewCycle(facesContext);
        UICommand submitButton = (UICommand) facesContext.getViewRoot().findComponent("mainForm:submit");

        executeViewHandlerRender(facesContext);
        executeAfterRender(facesContext);
       
        UIViewRoot root = new UIViewRoot();
View Full Code Here

        Assert.assertNotSame(-1, indexDynHeader1_2);
        Assert.assertNotSame(-1, indexDynHeader1_3);
       
        Assert.assertFalse(content1.contains("This is section 1"));

        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
        submit(button);
        processLifecycleExecute();
       
        CustomSessionBean sessionBean = facesContext.getApplication().evaluateExpressionGet(
                facesContext, "#{customSessionBean}", CustomSessionBean.class);
View Full Code Here

        Assert.assertNotNull(testId1_1);
        // With the line below, we put something into the state. The idea is everything inside
        // metadata facet should not be taken into account by the view pool
        testId1_1.getAttributes().put("param1", "value1");
       
        UICommand submitButton = (UICommand) facesContext.getViewRoot().findComponent("mainForm:submit");
       
        executeViewHandlerRender(facesContext);
       
        executeAfterRender(facesContext);
View Full Code Here

        Assert.assertEquals("c", itemC_1.getValue());
        itemC_1.getAttributes().put("prop", "c");
       
        executeViewHandlerRender(facesContext);
       
        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
        submit(button);
       
        processLifecycleExecute();

        UIOutput itemA_2 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_a");
        Assert.assertNotNull(itemA_2);
        Assert.assertEquals("a", itemA_2.getValue());
        Assert.assertEquals("a", itemA_2.getAttributes().get("prop"));
        UIOutput itemB_2 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_b");
        Assert.assertNotNull(itemB_2);
        Assert.assertEquals("b", itemB_2.getValue());
        Assert.assertEquals("b", itemB_2.getAttributes().get("prop"));
        UIOutput itemC_2 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_c");
        Assert.assertNotNull(itemC_2);
        Assert.assertEquals("c", itemC_2.getValue());
        Assert.assertEquals("c", itemC_2.getAttributes().get("prop"));

        ForEachBean bean = facesContext.getApplication().evaluateExpressionGet(facesContext, "#{forEachBean}",
            ForEachBean.class);
        bean.addFirst();
        bean.addMiddle();
        bean.removeLast();
       
        executeBeforeRender(facesContext);
        executeBuildViewCycle(facesContext);

        UIOutput itemA_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_a");
        Assert.assertNotNull(itemA_3);
        Assert.assertEquals("a", itemA_3.getValue());
        Assert.assertEquals("a", itemA_3.getAttributes().get("prop"));
        UIOutput itemB_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_b");
        Assert.assertNotNull(itemB_3);
        Assert.assertEquals("b", itemB_3.getValue());
        Assert.assertEquals("b", itemB_3.getAttributes().get("prop"));
        UIOutput itemC_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_c");
        Assert.assertNull(itemC_3);
        UIOutput itemZ_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_z");
        Assert.assertNotNull(itemZ_3);
        Assert.assertEquals("z", itemZ_3.getValue());
        Assert.assertNull(itemZ_3.getAttributes().get("prop"));
        UIOutput itemX_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_x");
        Assert.assertNotNull(itemX_3);
        Assert.assertEquals("x", itemX_3.getValue());
        Assert.assertNull(itemX_3.getAttributes().get("prop"));
       
        executeViewHandlerRender(facesContext);

        UICommand button2 = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
        submit(button2);
       
        processLifecycleExecute();

        UIOutput itemA_4 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_a");
View Full Code Here

        processLifecycleExecute();
        locale = facesContext.getViewRoot().getLocale();
        facesContext.getViewRoot().getViewMap(true).put("viewItem", "someValue");

        executeBuildViewCycle(facesContext);
        UICommand submitButton = (UICommand) facesContext.getViewRoot().findComponent("mainForm:submit");

        executeViewHandlerRender(facesContext);
        executeAfterRender(facesContext);
       
        submit(submitButton);
View Full Code Here

TOP

Related Classes of javax.faces.component.UICommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.