Package org.apache.tapestry

Examples of org.apache.tapestry.Link


    {
        String clientId = _support.allocateClientId(_resources.getId());

        Object[] activationContext = _context != null ? _context.toArray() : _emptyContext;

        Link link = _resources.createPageLink(_page, activationContext);

        writer.element("a", "href", link, "id", clientId);

        _resources.renderInformalParameters(writer);
    }
View Full Code Here


        String clientId = _support.allocateClientId(_resources.getId());

        Object[] contextArray = _context == null ? new Object[0] : _context.toArray();

        Link link = _resources.createActionLink(ACTION_EVENT, false, contextArray);

        writer.element("a", "href", link, "id", clientId);

        _resources.renderInformalParameters(writer);
    }
View Full Code Here

        if (generator instanceof LinkActionResponseGenerator)
        {
            LinkActionResponseGenerator linkGenerator = (LinkActionResponseGenerator) generator;

            Link link = linkGenerator.getLink();

            ComponentInvocation followup = _componentInvocationMap.get(link);

            return _followupInvoker.invoke(followup);
        }
View Full Code Here

        String[] activationContext = collectActivationContextForPage(containingPage);

        ComponentInvocation invocation = new ComponentInvocation(target, contextStrings,
                activationContext);

        Link link = new LinkImpl(_encoder, _contextPathSource.getContextPath(), invocation, forForm);

        // Now see if the page has an activation context.

        addActivationContextToLink(link, activationContext);
View Full Code Here

                : collectActivationContextForPage(page);

        PageLinkTarget target = new PageLinkTarget(logicalPageName);
        ComponentInvocation invocation = new ComponentInvocation(target, context, null);

        Link link = new LinkImpl(_encoder, _contextPathSource.getContextPath(), invocation, false);

        _componentInvocationMap.store(link, invocation);

        for (LinkFactoryListener listener : _listeners)
            listener.createdPageLink(link);
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, resolver, map, null,
                _typeCoercer);
        factory.addListener(listener);

        Link link = factory.createPageLink(page);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, resolver, map, null,
                _typeCoercer);
        factory.addListener(listener);

        Link link = factory.createPageLink(page, "biff", "bazz");

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, resolver, map, cache,
                _typeCoercer);
        factory.addListener(listener);

        Link link = factory.createPageLink(PAGE_LOGICAL_NAME);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

    {
        return new IAnswer<Void>()
        {
            public Void answer() throws Throwable
            {
                Link link = (Link) EasyMock.getCurrentArguments()[0];

                holder.put(link);

                return null;
            }
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, resolver, map, cache,
                _typeCoercer);
        factory.addListener(listener);

        Link link = factory.createActionLink(element, eventName, false, context);

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

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.Link

Copyright © 2018 www.massapicom. 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.