Package javax.faces.component

Examples of javax.faces.component.UINamingContainer.pushComponentToEL()


        HtmlCommandButton button1 = (HtmlCommandButton) facet1.findComponent("submitButton");
        Assert.assertNotNull(button1);
        HtmlCommandButton button2 = (HtmlCommandButton) facet1.findComponent("cancelAction");
        Assert.assertNotNull(button2);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        facet1.pushComponentToEL(facesContext, facet1);
        button1.pushComponentToEL(facesContext,  button1);

        MethodExpression method = button1.getActionExpression();
        Assert.assertEquals("testActionMethodTypeSubmit", method.invoke(facesContext.getELContext(), null));
View Full Code Here


        HtmlCommandButton button2 = (HtmlCommandButton) facet2.findComponent("cancelAction");
        Assert.assertNotNull(button2);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        facet1.pushComponentToEL(facesContext, facet1);
        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
        facet2.pushComponentToEL(facesContext, facet1);
        button1.pushComponentToEL(facesContext,  button1);

        MethodExpression method = button1.getActionExpression();
        Assert.assertEquals("testActionMethodTypeSubmit", method.invoke(facesContext.getELContext(), null));
View Full Code Here

       
        Assert.assertNotNull(input1n);
        Assert.assertNotNull(input1n.getValidators());
        Assert.assertEquals(1, input1n.getValidators().length);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        bean.setValidator1Called(false);
        input1n.getValidators()[0].validate(facesContext, input1n, "x");
        Assert.assertTrue(bean.isValidator1Called());
        compositeComponent1.popComponentFromEL(facesContext);
       
View Full Code Here

        Assert.assertNotNull(input1notarget);
        Assert.assertNotNull(input1notarget.getValidators());
        Assert.assertEquals(1, input1notarget.getValidators().length);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        compositeComponent1target.pushComponentToEL(facesContext, compositeComponent1target);
        bean.setValidator1Called(false);
        input1notarget.getValidators()[0].validate(facesContext, input1notarget, "x");
        Assert.assertTrue(bean.isValidator1Called());
        compositeComponent1target.popComponentFromEL(facesContext);
        compositeComponent1.popComponentFromEL(facesContext);
View Full Code Here

        Assert.assertNotNull(inputnotarget1target);
        Assert.assertNotNull(inputnotarget1target.getValidators());
        Assert.assertEquals(1, inputnotarget1target.getValidators().length);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        compositeComponent1notarget.pushComponentToEL(facesContext, compositeComponent1notarget);
        bean.setValidator1Called(false);
        inputnotarget1target.getValidators()[0].validate(facesContext, inputnotarget1target, "x");
        Assert.assertTrue(bean.isValidator1Called());
        compositeComponent1notarget.popComponentFromEL(facesContext);
        compositeComponent1.popComponentFromEL(facesContext);
View Full Code Here

            VariableMapper orig = faceletContext.getVariableMapper();
            try
            {
                faceletContext.setVariableMapper(new VariableMapperWrapper(orig));

                compositeComponentBase.pushComponentToEL(context, compositeComponentBase);

                compositeComponentFacelet.apply(context, compositeComponentBase);

                compositeComponentBase.popComponentFromEL(context);
            }
View Full Code Here

       
        SimpleComponent testComponentNoTarget = (SimpleComponent) compositeComponent.findComponent("testComponentNoTarget");
        Assert.assertNotNull(testComponentNoTarget);
        Assert.assertNotNull(testComponentNoTarget.getCustomMethod());
       
        compositeComponent.pushComponentToEL(facesContext, compositeComponent);
        Assert.assertEquals("somethingFunny"+"x", testComponentNoTarget.getCustomMethod().invoke(facesContext.getELContext(), new Object[]{"x"}));
        compositeComponent.popComponentFromEL(facesContext);
    }

    @Test
View Full Code Here

        Assert.assertEquals("somethingFunny"+"x", testComponent.getCustomMethod().invoke(facesContext.getELContext(), new Object[]{"x"}));
       
        SimpleComponent testComponentNoTarget = (SimpleComponent) compositeComponent.findComponent("testComponentNoTarget");
        Assert.assertNotNull(testComponentNoTarget);
        Assert.assertNotNull(testComponentNoTarget.getCustomMethod());
        compositeComponent.pushComponentToEL(facesContext, compositeComponent);
        Assert.assertEquals("somethingFunny"+"x", testComponentNoTarget.getCustomMethod().invoke(facesContext.getELContext(), new Object[]{"x"}));
        compositeComponent.popComponentFromEL(facesContext);
    }

    @Test
View Full Code Here

        Assert.assertNotNull(compositeComponent3);
        SimpleComponent testComponent3 = (SimpleComponent) compositeComponent3.findComponent("testComponent");
        Assert.assertNotNull(testComponent3);
        Assert.assertNotNull(testComponent3.getCustomMethod());
        compositeComponent.pushComponentToEL(facesContext, compositeComponent);
        compositeComponent3.pushComponentToEL(facesContext, compositeComponent3);
        Assert.assertEquals("somethingFunny"+"x", testComponent3.getCustomMethod().invoke(facesContext.getELContext(), new Object[]{"x"}));
        compositeComponent3.popComponentFromEL(facesContext);
        compositeComponent.popComponentFromEL(facesContext);
       
        SimpleComponent testComponentNoTarget3 = (SimpleComponent) compositeComponent3.findComponent("testComponentNoTarget");
View Full Code Here

       
        SimpleComponent testComponentNoTarget3 = (SimpleComponent) compositeComponent3.findComponent("testComponentNoTarget");
        Assert.assertNotNull(testComponentNoTarget3);
        Assert.assertNotNull(testComponentNoTarget3.getCustomMethod());
        compositeComponent.pushComponentToEL(facesContext, compositeComponent);
        compositeComponent3.pushComponentToEL(facesContext, compositeComponent3);
        Assert.assertEquals("somethingFunny"+"x", testComponentNoTarget3.getCustomMethod().invoke(facesContext.getELContext(), new Object[]{"x"}));
        compositeComponent3.popComponentFromEL(facesContext);
        compositeComponent.popComponentFromEL(facesContext);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.