Package org.apache.tapestry5

Examples of org.apache.tapestry5.Link.toURI()


        PageRenderRequestParameters parameters = new PageRenderRequestParameters("admin/Index", new ArrayEventContext(
                typeCoercer, "abc"));

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toURI(), "MAGIC");

        verify();
    }

    @Test
View Full Code Here


        PageRenderRequestParameters parameters = new PageRenderRequestParameters("Index", new EmptyEventContext());

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toURI(), "MAGIC");

        verify();
    }

    @Test
View Full Code Here

        if (InternalUtils.isNonBlank(update))
            spec.put("update", update.toLowerCase());

        spec.put("element", clientId);
        spec.put("url", link.toURI());

        jsSupport.addInitializerCall("progressiveDisplay", spec);

        return initial;
    }
View Full Code Here

        Link link = new LinkImpl(url, false, LinkSecurity.INSECURE, response, null, null);
        link.setAnchor("wilma");

        assertSame(link.getAnchor(), "wilma");

        assertEquals(link.toURI(), ENCODED + "#" + "wilma");

        verify();
    }

    @Test
View Full Code Here

        replay();

        Link link = new LinkImpl("/ctx/foo?foo=bar", false, LinkSecurity.INSECURE, response, null, null);
        link.addParameter("baz", "barney");

        assertEquals(link.toURI(), expectedURI);

        verify();
    }

    @Test
View Full Code Here

        Link link = new LinkImpl("/ctx/foo", false, LinkSecurity.INSECURE, response, encoder, null);

        assertSame(link.addParameterValue("bar", "plain"), link);

        assertEquals(link.toURI(), expectedURI);

        verify();
    }

    @Test
View Full Code Here

        link.addParameter("baz", "barney");
        link.setAnchor("jacob");

        Link copy = link.copyWithBasePath("/ctx/baz");

        assertEquals(copy.toURI(), expectedURI + "#jacob");

        verify();
    }

    @Test
View Full Code Here

        Link link = new LinkImpl("/foo/bar", true, false, response, optimizer);
        link.setAnchor("wilma");

        assertSame(link.getAnchor(), "wilma");

        assertEquals(link.toURI(), ENCODED + "#" + "wilma");

        verify();
    }

View Full Code Here

        // This could be shifted to createEventLink(), but leaving it alone verifys backwards
        // compatibility to 5.0.14.

        Link link = resources.createActionLink("UpdateMessage", false, "from getActionURL()");

        return link.toURI();
    }
}
View Full Code Here

    {
        Link link = resources.createEventLink("image");

        writer.element("img",

                "src", link.toURI(),

                "width", producer.getWidth(),

                "height", producer.getHeight());
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.