Package org.apache.tapestry5

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


        train_encodeURL(response, expectedURI, expectedURI);

        replay();

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

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

        assertEquals(copy.toURI(), expectedURI + "#jacob");
View Full Code Here


    @Test
    public void remove_parameter()
    {
        Link link = new LinkImpl("/baseURI", false, null, null, null, null);

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

        link.removeParameter("fred");

        assertNull(link.getParameterValue("fred"));
View Full Code Here

    public void remove_parameter()
    {
        Link link = new LinkImpl("/baseURI", false, null, null, null, null);

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

        link.removeParameter("fred");

        assertNull(link.getParameterValue("fred"));
        assertListsEquals(link.getParameterNames(), "barney");
View Full Code Here

        replay();

        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();
View Full Code Here

        replay();

        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();
    }
View Full Code Here

    private Link buildLink()
    {
        Link l = linkSource.createPageRenderLink(LinkQueryParameters.class);
        for(String param : request.getParameterNames())
        {
            l.addParameter(param,request.getParameter(param));
        }

        return l;
    }
View Full Code Here

            // Reuse the builder           
            builder.setLength(0);
            appendContext(pageActivationContext, builder);

            // Omit that first slash
            result.addParameter(InternalConstants.PAGE_CONTEXT_NAME, builder.substring(1));
        }

        // TAPESTRY-2044: Sometimes the active page drags in components from another page and we
        // need to differentiate that.
View Full Code Here

        // TAPESTRY-2044: Sometimes the active page drags in components from another page and we
        // need to differentiate that.

        if (!containingPageName.equalsIgnoreCase(activePageName))
            result.addParameter(InternalConstants.CONTAINER_PAGE_NAME, containingPageName.toLowerCase());

        return result;
    }

View Full Code Here

        String fieldName = "biff";
        Object value = 99;

        // Use an IAnswer to capture the value.

        link.addParameter(eq(ClientPersistentFieldStorageImpl.PARAMETER_NAME), isA(String.class));
        setAnswer(new IAnswer<Void>()
        {
            public Void answer() throws Throwable
            {
                String base64 = (String) EasyMock.getCurrentArguments()[1];
View Full Code Here

        Link link = mockLink();

        String pageName = "Foo";
        String componentId = "bar.baz";

        link.addParameter(eq(ClientPersistentFieldStorageImpl.PARAMETER_NAME), isA(String.class));

        replay();

        ClientPersistentFieldStorage storage = new ClientPersistentFieldStorageImpl(request, clientDataEncoder);
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.