Package org.apache.tapestry5

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


        // 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, encodePageName(containingPageName));

        return result;
    }

    public ComponentEventRequestParameters decodeComponentEventRequest(Request request)
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

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

        if (activePage != page)
            link.addParameter(InternalConstants.CONTAINER_PAGE_NAME, page.getLogicalName().toLowerCase());

        // This is a hook used for testing; we can relate the link to an invocation so that we can simulate
        // the clicking of the link (or submitting of the form).

        componentInvocationMap.store(link, invocation);
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";

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

        replay();

        ClientPersistentFieldStorage storage = new ClientPersistentFieldStorageImpl(request, clientDataEncoder);
View Full Code Here

        replay();

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

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

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

        verify();
    }
View Full Code Here

        train_encodeURL(response, expectedURI, expectedURI);

        replay();

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

        assertEquals(link.toURI(), expectedURI);

        verify();
    }
View Full Code Here

        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

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.