Package com.sun.facelets

Examples of com.sun.facelets.Facelet.apply()


         {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
            Facelet f = new DefaultFaceletFactory( new SAXCompiler(), new DefaultResourceResolver() ).getFacelet(url);
            UIViewRoot root = facesContext.getViewRoot();
            f.apply(facesContext, root);
            HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
            response.setCharacterEncoding("UTF-8");
            response.setContentType("text/html; UTF-8");
            ResponseWriter writer = facesContext.getRenderKit().createResponseWriter( response.getWriter(), "text/html", "UTF-8" );
            facesContext.setResponseWriter(writer);
View Full Code Here


        Facelet f = ff.getFacelet("test-tags.xml");
       
        this.servletRequest.setAttribute("test", "foo");
       
        UIViewRoot root = faces.getViewRoot();
        f.apply(faces, root);
       
        FastWriter fw = new FastWriter();
        MockResponseWriter mrw = new MockResponseWriter(fw);
        faces.setResponseWriter(mrw);
        root.encodeAll(faces);
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("actionListener.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);

        UICommand action1 = (UICommand) root.findComponent("action1");
        UICommand action2 = (UICommand) root.findComponent("action2");

        assertNotNull("action1", action1);
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("attribute.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);

        HtmlGraphicImage graphic1 = (HtmlGraphicImage) root
                .findComponent("graphic1");
        HtmlGraphicImage graphic2 = (HtmlGraphicImage) root
                .findComponent("graphic2");
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("convertDateTime.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);

        UIOutput out1 = (UIOutput) root.findComponent("form:out1");
        UIOutput out2 = (UIOutput) root.findComponent("form:out2");
        UIOutput out3 = (UIOutput) root.findComponent("form:out3");
        UIOutput out4 = (UIOutput) root.findComponent("form:out4");
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("converter.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIOutput out1 = (UIOutput) root.findComponent("out1");
       
        assertNotNull("out1", out1);
       
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("convertNumber.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIOutput out1 = (UIOutput) root.findComponent("out1");
        UIOutput out2 = (UIOutput) root.findComponent("out2");
        UIOutput out3 = (UIOutput) root.findComponent("out3");
        UIOutput out4 = (UIOutput) root.findComponent("out4");
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("facet.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIData data = (UIData) root.findComponent("table");
       
        assertNotNull("data", data);
       
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("loadBundle.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        Object value = faces.getExternalContext().getRequestMap().get("foo");
       
        assertNotNull("bundle loaded into request", value);
    }
View Full Code Here

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("validator.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIInput input = (UIInput) root.findComponent("form:input");
       
        assertNotNull("input", input);
       
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.