Package org.apache.tapestry

Examples of org.apache.tapestry.Link


        LinkFactory factory = new LinkFactoryImpl(request, response, resolver, map, cache,
                _typeCoercer);
        factory.addListener(listener);

        Link link = factory.createActionLink(element, eventName, false, context);

        assertEquals(link.toURI(), ENCODED);
        assertSame(link, holder.get());

        verify();
    }
View Full Code Here


        train_encodeURL(response, "/foo/bar?barney=rubble&fred=flintstone", ENCODED);

        replay();

        Link link = new LinkImpl(response, "/foo", "bar");

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", "rubble");

        assertEquals(link.toURI(), ENCODED);

        verify();
    }
View Full Code Here

    {
        Response response = mockResponse();

        replay();

        Link link = new LinkImpl(response, "/foo", "bar");

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", "rubble");

        assertEquals(link.getParameterValue("fred"), "flintstone");
        assertEquals(link.getParameterValue("barney"), "rubble");
        assertNull(link.getParameterValue("wilma"));

        verify();
    }
View Full Code Here

    {
        Response response = mockResponse();

        replay();

        Link link = new LinkImpl(response, "/foo", "bar");

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", "rubble");

        assertEquals(link.getParameterNames(), Arrays.asList("barney", "fred"));

        verify();
    }
View Full Code Here

    {
        Response response = mockResponse();

        replay();

        Link link = new LinkImpl(response, "/foo", "bar");

        link.addParameter("fred", "flintstone");
        try
        {
            link.addParameter("fred", "flintstone");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(
View Full Code Here

        train_encodeURL(response, "/foo/bar", ENCODED);

        replay();

        Link link = new LinkImpl(response, "/foo", "bar", true);

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", "rubble");

        assertEquals(link.toURI(), ENCODED);

        verify();
    }
View Full Code Here

        Logger logger = mockLogger();
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        LinkFactory factory = mockLinkFactory();
        Response response = mockResponse();
        Link link = mockLink();

        train_getComponentResources(result, resources);
        train_getContainer(resources, null);

        train_getPageName(resources, PAGE_NAME);
View Full Code Here

        Logger logger = mockLogger();
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        LinkFactory factory = mockLinkFactory();
        Response response = mockResponse();
        Link link = mockLink();

        train_getComponentResources(value, valueResources);

        train_getContainer(valueResources, containerResources);
        train_getComponentResources(source, sourceResources);
View Full Code Here

        train_encodeURL(response, "/foo/bar?barney=rubble&fred=flintstone", ENCODED);

        replay();

        Link link = new LinkImpl(response, "/foo", "bar");

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", "rubble");

        assertEquals(link.toURI(), ENCODED);

        verify();
    }
View Full Code Here

    {
        Response response = mockResponse();

        replay();

        Link link = new LinkImpl(response, "/foo", "bar");

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", "rubble");

        assertEquals(link.getParameterValue("fred"), "flintstone");
        assertEquals(link.getParameterValue("barney"), "rubble");
        assertNull(link.getParameterValue("wilma"));

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.Link

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.