Package org.apache.tapestry

Examples of org.apache.tapestry.IRequestCycle.removeAttribute()


    public void testCleanupAfterRender()
    {
        IRequestCycle cycle = newCycle();

        cycle.removeAttribute(LinkSubmit.ATTRIBUTE_NAME);

        replayControls();

        LinkSubmit linkSubmit = (LinkSubmit) newInstance(LinkSubmit.class);
View Full Code Here


        cycle.setAttribute(eq("org.apache.tapestry.PageRenderSupport"),
                isA(PageRenderSupport.class));
       
        cycle.renderPage(isA(ResponseBuilder.class));
       
        cycle.removeAttribute("org.apache.tapestry.PageRenderSupport");
       
        return cycle;
    }

    public void testSuccess() throws Exception
View Full Code Here

       
        expect(cycle.getResponseBuilder()).andReturn(builder);
       
        builder.render(nested, field, cycle);
       
        cycle.removeAttribute(TapestryUtils.FIELD_PRERENDER);
       
        expect(nested.getBuffer()).andReturn("NESTED CONTENT");

        replay();
View Full Code Here

    public void testCleanupAfterRender()
    {
        IRequestCycle cycle = newCycle();

        cycle.removeAttribute(LinkSubmit.ATTRIBUTE_NAME);

        replay();

        LinkSubmit linkSubmit = (LinkSubmit) newInstance(LinkSubmit.class);
View Full Code Here

        nested.close();

        writer.end();

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replay();

        new DefaultLinkRenderer().renderLink(writer, cycle, component);
View Full Code Here

       
        nested.close();
       
        writer.end();
       
        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replay();

        new DefaultLinkRenderer().renderLink(writer, cycle, component);
View Full Code Here

        trainIsDisabled(component, true);

        component.renderBody(writer, cycle);

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replay();

        new DefaultLinkRenderer().renderLink(writer, cycle, component);
View Full Code Here

        trainIsDisabled(component, false);
        trainIsRewinding(cycle, true);

        component.renderBody(writer, cycle);

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replay();

        new DefaultLinkRenderer().renderLink(writer, cycle, component);
View Full Code Here

        nested.close();

        writer.end();

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replay();

        new RendererFixture(writer, cycle, component, "xlink", true, "xtarget", "xurl").renderLink(
                writer,
View Full Code Here

        writer.print("AFTER-BODY-RENDER");
       
        writer.closeTag();
       
        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replay();

        new RendererFixture(writer, cycle, component, "xlink", false, "xtarget", "xurl")
                .renderLink(writer, cycle, component);
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.