Package javax.faces.component

Examples of javax.faces.component.UIViewRoot.encodeAll()


       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
        root.encodeAll(facesContext);
        rw.flush();
       
        String result = fw.toString();
        Assert.assertTrue("Output should contain 'rightValue'", result.contains("rightValue"));
        Assert.assertFalse("Output should not contain 'doNotPrintValue'", result.contains("doNotPrintValue"));
View Full Code Here


       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
        root.encodeAll(facesContext);
        rw.flush();
       
        String result = fw.toString();
        Assert.assertTrue("Output should contain 'rightValue'", result.contains("rightValue"));
        Assert.assertFalse("Output should not contain 'doNotPrintValue'", result.contains("doNotPrintValue"));
View Full Code Here

    {
        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root, page);

        // render view
        root.encodeAll(facesContext);
        final String output = _writer.toString();

        // assertions
        Assert.assertTrue(output.contains("<span id=\"body\">BODY</span>"));
        Assert.assertTrue(output.contains("<span id=\"popupSpan\"><p>[POPUPCONTENT]</p></span>"));
View Full Code Here

    {
        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root, page);

        // render view
        root.encodeAll(facesContext);
        final String output = _writer.toString();

        // assertions
        Assert.assertTrue(output.contains("<span>defined content</span>"));
    }
View Full Code Here

    {
        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root, page);

        // render view
        root.encodeAll(facesContext);
        final String output = _writer.toString();

        // assertions
        Assert.assertTrue(output
                .contains("<span>default ui:insert content</span>"));
View Full Code Here

        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root,
                "multilevel_template_OuterClient_with_define.xhtml");

        // render view
        root.encodeAll(facesContext);
        String output = _writer.toString();
        output = output.replaceAll("(?s)<!--.*?-->", ""); // remove license headers for clarity

        // assertions
        Assert.assertTrue(output.contains("<body>inner content</body>"));
View Full Code Here

        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root,
                "multilevel_template_OuterClient.xhtml");

        // render view
        root.encodeAll(facesContext);
        String output = _writer.toString();
        output = output.replaceAll("(?s)<!--.*?-->", ""); // remove license headers for clarity

        // assertions
        Assert.assertTrue(output
View Full Code Here

       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
        root.encodeAll(facesContext);
        String content = fw.toString();
       
        int hrIndex = content.indexOf("<dt>HR</dt>");
        Assert.assertNotSame(-1, hrIndex);
        int rdIndex = content.indexOf("<dt>RD</dt>", hrIndex);
View Full Code Here

       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
        root.encodeAll(facesContext);
        String content = fw.toString();
       
        int hrIndex = content.indexOf("<dt>HR</dt>");
        Assert.assertNotSame(-1, hrIndex);
        int rdIndex = content.indexOf("<dt>RD</dt>", hrIndex);
View Full Code Here

        vdl.buildView(facesContext, root, "test-tags.xml");
       
        FastWriter fw = new FastWriter();
        MockResponseWriter mrw = new MockResponseWriter(fw);
        facesContext.setResponseWriter(mrw);
        root.encodeAll(facesContext);
        //System.out.println(fw);
    }

    /**
     * Simple attribute passing should only be available on target xhtml source
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.