Package org.apache.tapestry.engine

Examples of org.apache.tapestry.engine.ILink


        IScript script = source.getScript(scriptLocation);

        Map symbols = new HashMap();

        IEngineService service = engine.getService(Tapestry.DIRECT_SERVICE);
        ILink link = service.getLink(cycle, this, null);

        symbols.put("URL", link.getURL());

        Body body = Body.get(cycle);

        if (body == null)
            throw new ApplicationRuntimeException(
View Full Code Here


        String checksum = engine.getResourceChecksumSource().getChecksum(resourceURL);
       
        String[] parameters = new String[] { path, checksum };

        AssetService service = (AssetService) engine.getService(Tapestry.ASSET_SERVICE);
        ILink link = service.getLink(cycle, null, parameters);

        return link.getURL();
    }
View Full Code Here

        context[0] = embedded.getIdPath();

        // Build a URL to select that component, as if by the captive
        // component itself (it's a Direct).

        ILink link = service.getLink(getPage().getRequestCycle(), this, context);

        writer.begin("span");
        writer.attribute("class", "jwc-tag");

        writer.print("<");
        writer.print(token.getTag());

        writer.print(" jwcid=\"");

        writer.begin("span");
        writer.attribute("class", "jwc-id");

        writer.begin("a");
        writer.attribute("href", link.getURL());
        writer.print(id);

        writer.end(); // <a>
        writer.end(); // <span>
        writer.print('"');
View Full Code Here

        // for the current page.

        IEngineService pageService = cycle.getEngine().getService(Tapestry.PAGE_SERVICE);
        String pageName = getPage().getPageName();

        ILink link = pageService.getLink(cycle, null, new String[] { pageName });

        StringBuffer buffer = new StringBuffer();
        buffer.append(refresh);
        buffer.append("; URL=");
        buffer.append(link.getAbsoluteURL());

        // Write out the <meta> tag

        writer.beginEmpty("meta");
        writer.attribute("http-equiv", "Refresh");
View Full Code Here

        if (cycle.isRewinding())
            return;

        IEngine engine = cycle.getEngine();
        IEngineService pageService = engine.getService(Tapestry.PAGE_SERVICE);
        ILink link = pageService.getLink(cycle, this, new String[] { getTargetPage() });

        writer.beginEmpty("frame");
        writer.attribute("src", link.getURL());

        renderInformalParameters(writer, cycle);

        writer.closeTag();
    }
View Full Code Here

        boolean disabled = linkComponent.isDisabled();

        if (!disabled)
        {
            ILink l = linkComponent.getLink(cycle);

            if (hasBody)
                writer.begin(getElement());
            else
                writer.beginEmpty(getElement());
View Full Code Here

            String storedIdList = cycle.getRequestContext().getParameter(_name);

            reconstructAllocatedIds(storedIdList);
        }

        ILink link = getLink(cycle, actionId);

        // When rendering, use a nested writer so that an embedded Upload
        // component can force the encoding type.

        IMarkupWriter nested = writer.getNestedWriter();
View Full Code Here

     *      org.apache.tapestry.IRequestCycle)
     */
    protected String constructURL(ILinkComponent component, IRequestCycle cycle)
    {
        String anchor = component.getAnchor();
        ILink link = component.getLink(cycle);

        String url = link.getURL(anchor, true);

        PageRenderSupport support = TapestryUtils.getPageRenderSupport(cycle, component);

        String functionName = support.getUniqueString("popup_window");

View Full Code Here

        lf.initializeService();

        Map parameters = new HashMap();

        ILink link = lf.constructLink(service, false, parameters, false);

        verifyControls();

        assertEquals("/context/app?service=myservice", link.getURL());
    }
View Full Code Here

        lf.initializeService();

        Map parameters = new HashMap();

        ILink link = lf.constructLink(service, false, parameters, true);

        assertEquals("{encoded}", link.getURL());

        verifyControls();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.engine.ILink

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.