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

    private ComponentResources resources;

    public Link getWorkingLink()
    {
        Link link = resources.createEventLink(EVENT_NAME);
        link.addParameter(PARAMETER_NAME, "97");

        return link;
    }

    public Link getBrokenLink()
View Full Code Here

    }

    public Link getBrokenLink()
    {
        Link link = resources.createEventLink(EVENT_NAME);
        link.addParameter(PARAMETER_NAME, "frodo");

        return link;
    }

    public Link getNullLink()
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;
    }

    public ComponentEventRequestParameters decodeComponentEventRequest(Request request)
View Full Code Here

        replay();

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

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

        assertEquals(link.getParameterValue("fred"), "flintstone");

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

            // 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

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.