Package org.apache.myfaces.view.facelets.util

Examples of org.apache.myfaces.view.facelets.util.FastWriter


        vdl.buildView(facesContext, root, "ui_repeat_offset.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat0");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        repeat.encodeAll(facesContext);
       
        String content = fw.toString();

        int itemIndex1 = content.indexOf("B1");
        Assert.assertNotSame(-1, itemIndex1);
        int itemIndex2 = content.indexOf("B2");
        Assert.assertNotSame(-1, itemIndex2);
View Full Code Here


        vdl.buildView(facesContext, root, "ui_repeat_offset.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat0_7");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        repeat.encodeAll(facesContext);
       
        String content = fw.toString();

        int itemIndex1 = content.indexOf("B1");
        Assert.assertNotSame(-1, itemIndex1);
        int itemIndex2 = content.indexOf("B2", itemIndex1);
        Assert.assertNotSame(-1, itemIndex2);
View Full Code Here

        vdl.buildView(facesContext, root, "ui_repeat_offset.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat0_8");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        try
View Full Code Here

        vdl.buildView(facesContext, root, "ui_repeat_offset.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat1");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        repeat.encodeAll(facesContext);
       
        String content = fw.toString();

        int itemIndex1 = content.indexOf("B1");
        Assert.assertEquals(-1, itemIndex1);
        int itemIndex2 = content.indexOf("B2");
        Assert.assertNotSame(-1, itemIndex2);
View Full Code Here

        vdl.buildView(facesContext, root, "ui_repeat_offset.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat1_7");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        repeat.encodeAll(facesContext);
       
        String content = fw.toString();

        int itemIndex1 = content.indexOf("B1");
        Assert.assertEquals(-1, itemIndex1);
        int itemIndex2 = content.indexOf("B2");
        Assert.assertNotSame(-1, itemIndex2);
View Full Code Here

        vdl.buildView(facesContext, root, "ui_repeat_offset.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat1_8");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        try
View Full Code Here

        vdl.buildView(facesContext, root, "ui_repeat_offset2.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        repeat.encodeAll(facesContext);
       
        String content = fw.toString();

        int itemIndex1 = content.indexOf("B1");
        Assert.assertEquals(-1, itemIndex1);
        int itemIndex2 = content.indexOf("B2");
        Assert.assertEquals(-1, itemIndex2);
View Full Code Here

        instructions.add(new LiteralTextInstruction("   "));
       
        int size = instructions.size();
        size = TextUnit.compressSpaces(instructions, size);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);

        for (Instruction i : instructions)
        {
            i.write(facesContext);
        }
       
        Assert.assertEquals(fw.toString(), " <p> hello </p><tr><td/></tr> ");
    }
View Full Code Here

        instructions.add(new EndElementInstruction("p"));

        int size = instructions.size();
        size = TextUnit.compressSpaces(instructions, size);

        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);

        for (Instruction i : instructions)
        {
            i.write(facesContext);
        }
       
        Assert.assertEquals(fw.toString(), "<p> hello </p>");

    }
View Full Code Here

        instructions.add(new LiteralTextInstruction("\n   "));
       
        int size = instructions.size();
        size = TextUnit.compressSpaces(instructions, size);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);

        for (Instruction i : instructions)
        {
            i.write(facesContext);
        }
       
        Assert.assertEquals(fw.toString(), " <p> hello </p><tr><td/></tr>\n");
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.view.facelets.util.FastWriter

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.