Package org.apache.tapestry5

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


        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("/ctx/foo", false, LinkSecurity.INSECURE, response, null, null);

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

        assertEquals(link.toURI(), expectedURI);

        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

    protected final Link mockLink(String absoluteURI)
    {
        Link link = mockLink();

        expect(link.toURI()).andReturn(absoluteURI).atLeastOnce();

        return link;
    }
}
View Full Code Here

        }

        // Let subclasses do more.
        configure(config);

        JSONObject spec = new JSONObject("elementId", id, "menuId", menuId, "url", link.toURI()).put("config",
                config);

        jsSupport.addInitializerCall("autocompleter", spec);
    }
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

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

        writer.element("img",

                "src", link.toURI(),

                "width", producer.getWidth(),

                "height", producer.getHeight());
View Full Code Here

                                                  contextValueEncoder, securityManager);
        factory.addListener(listener);

        Link link = factory.createComponentEventLink(page, null, "myaction", false, "1.2.3", "4.5.6");

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

        verify();
    }
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.