Package org.apache.tapestry

Examples of org.apache.tapestry.IRender


    public void testRenderSimple()
    {
        IRequestCycle cycle = newRequestCycle(false);
        IMarkupWriter writer = newWriter();
        IRender body = newRender(writer, cycle);

        replayControls();

        Conditional conditional = (Conditional) newInstance(Conditional.class, new Object[]
        { "condition", Boolean.TRUE });
View Full Code Here


    public void testIgnoreElementWhenRewinding()
    {
        IRequestCycle cycle = newRequestCycle(true);
        IMarkupWriter writer = newWriter();
        IRender body = newRender(writer, cycle);

        replayControls();

        Conditional conditional = (Conditional) newInstance(Conditional.class, new Object[]
        { "condition", Boolean.TRUE, "element", "div" });
View Full Code Here

        IBinding informal = newBinding("informal-value");
        IComponentSpecification spec = newSpec("informal", null);

        IRequestCycle cycle = newRequestCycle(false);
        IMarkupWriter writer = newWriter();
        IRender body = newRender(writer, cycle);

        writer.begin("div");
        writer.attribute("informal", "informal-value");

        // We've trained body, but there's no way to ensure,
View Full Code Here

    public void testRewinding()
    {
        IMarkupWriter writer = newMarkupWriter();
        IRequestCycle cycle = newRequestCycle(true);

        IRender body = newRender();

        body.render(writer, cycle);

        replayControls();

        Shell shell = (Shell) _creator.newInstance(Shell.class);
View Full Code Here

        _writer.reset();
    }

    public void test_Null_Render()
    {
        IRender render = newMock(IRender.class);
        IRequestCycle cycle = newMock(IRequestCycle.class);
        IMarkupWriter writer = newWriter();

        ResponseBuilder builder = new DojoAjaxResponseBuilder(cycle, writer, null);

        render.render(NullWriter.getSharedInstance(), cycle);

        replay();

        builder.render(writer, render, cycle);
View Full Code Here

        assertSame(builder.getWriter(), writer);
    }

    public void test_Normal_Render()
    {
        IRender render = newMock(IRender.class);
        IRequestCycle cycle = newMock(IRequestCycle.class);
        IMarkupWriter writer = newMock(IMarkupWriter.class);

        ResponseBuilder builder = new DojoAjaxResponseBuilder(cycle, writer, null);

        render.render(NullWriter.getSharedInstance(), cycle);

        replay();

        builder.render(null, render, cycle);
View Full Code Here

        verify();
    }

    public void test_Partial_Render()
    {
        IRender render = newMock(IRender.class);

        IComponent comp1 = newMock(IComponent.class);
        IRequestCycle cycle = newMock(IRequestCycle.class);
        IMarkupWriter writer = newMock(IMarkupWriter.class);
        NestedMarkupWriter nested = newMock(NestedMarkupWriter.class);

        Infrastructure infra = newMock(Infrastructure.class);

        List parts = new ArrayList();
        parts.add("id1");

        DojoAjaxResponseBuilder builder = new DojoAjaxResponseBuilder(cycle, writer, parts);

        render.render(NullWriter.getSharedInstance(), cycle);

        expect(comp1.getClientId()).andReturn("id1").anyTimes();
        expect(comp1.peekClientId()).andReturn("id1").anyTimes();
        expect(cycle.getInfrastructure()).andReturn(infra);
        expect(infra.getOutputEncoding()).andReturn("UTF-8");
View Full Code Here

        _writer.reset();
    }
   
    public void test_Null_Render()
    {
        IRender render = (IRender)newMock(IRender.class);
        IRequestCycle cycle = (IRequestCycle)newMock(IRequestCycle.class);
       
        ResponseBuilder builder = new DefaultResponseBuilder(null);
       
        render.render(null, cycle);
       
        replay();
       
        builder.render(null, render, cycle);
       
View Full Code Here

        assertSame(builder.getWriter(), NullWriter.getSharedInstance());
    }
   
    public void test_Normal_Render()
    {
        IRender render = (IRender)newMock(IRender.class);
        IRequestCycle cycle = (IRequestCycle)newMock(IRequestCycle.class);
        IMarkupWriter writer = (IMarkupWriter)newMock(IMarkupWriter.class);
       
        ResponseBuilder builder = new DefaultResponseBuilder(writer);
       
        render.render(writer, cycle);
       
        replay();
       
        builder.render(null, render, cycle);
       
View Full Code Here

            writer.print(getTitle());
            writer.end(); // title
            writer.println();

            IRender delegate = getDelegate();

            if (delegate != null)
                delegate.render(writer, cycle);

            IAsset stylesheet = getStylesheet();

            if (stylesheet != null)
                writeStylesheetLink(writer, cycle, stylesheet);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IRender

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.