Package javax.faces.component

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


            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


            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

        UIComponent facet1 = compositeComponent1.getFacet(UIComponent.COMPOSITE_FACET_NAME);
        Assert.assertNotNull(facet1);
        HtmlOutputText text1 = (HtmlOutputText) facet1.findComponent("text");
        Assert.assertNotNull(text1);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        facet1.pushComponentToEL(facesContext, facet1);
        text1.pushComponentToEL(facesContext, text1);
        //set on tag
        Assert.assertEquals("class1", text1.getStyleClass());
        //set as default
View Full Code Here

        UIComponent facet2 = compositeComponent2.getFacet(UIComponent.COMPOSITE_FACET_NAME);
        Assert.assertNotNull(facet2);       
        HtmlOutputText text2 = (HtmlOutputText) facet2.findComponent("text");
        Assert.assertNotNull(text2);
       
        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
        facet2.pushComponentToEL(facesContext, facet2);
        text2.pushComponentToEL(facesContext, text2);
        //set on tag
        Assert.assertEquals("background:green", text2.getStyle());
        // not set, should return null, but since there is a ValueExpression indirection,
View Full Code Here

        UIComponent facet1 = compositeComponent1.getFacet(UIComponent.COMPOSITE_FACET_NAME);
        Assert.assertNotNull(facet1);
        HtmlOutputText text1 = (HtmlOutputText) facet1.findComponent("text");
        Assert.assertNotNull(text1);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        facet1.pushComponentToEL(facesContext, facet1);
        text1.pushComponentToEL(facesContext, text1);
        //set on tag
        Assert.assertEquals("class1", text1.getStyleClass());
        //set as default
View Full Code Here

        UIComponent facet2 = compositeComponent2.getFacet(UIComponent.COMPOSITE_FACET_NAME);
        Assert.assertNotNull(facet2);       
        HtmlOutputText text2 = (HtmlOutputText) facet2.findComponent("text");
        Assert.assertNotNull(text2);
       
        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
        facet2.pushComponentToEL(facesContext, facet2);
        text2.pushComponentToEL(facesContext, text2);
        //set on tag
        Assert.assertEquals("background:green", text2.getStyle());
        // not set, should return null, but since there is a ValueExpression indirection,
View Full Code Here

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

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

       
        Assert.assertNotNull(button1n);
        Assert.assertNotNull(button1n.getActionListeners());
        Assert.assertEquals(1, button1n.getActionListeners().length);
       
        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
        bean.setActionListener1Called(false);
        button1n.getActionListeners()[0].processAction(new ActionEvent(button1n));
        Assert.assertTrue(bean.isActionListener1Called());
        compositeComponent1.popComponentFromEL(facesContext);
       
View Full Code Here

       
        Assert.assertNotNull(button2n);
        Assert.assertNotNull(button2n.getActionListeners());
        Assert.assertEquals(1, button2n.getActionListeners().length);
       
        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
        bean.setActionListener2Called(false);
        button2n.getActionListeners()[0].processAction(new ActionEvent(button2n));
        Assert.assertTrue(bean.isActionListener2Called());
        compositeComponent2.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.