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, new DirectServiceParameter(this));

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

        PageRenderSupport pageRenderSupport = TapestryUtils.getPageRenderSupport(cycle, this);

        script.execute(cycle, pageRenderSupport, symbols);
View Full Code Here


        _name = baseName + getResponse().getNamespace();

        if (_renderInformalParameters == null)
            _renderInformalParameters = new RenderInformalParameters();

        ILink link = getLink(cycle, actionId);

        _formSupport.render(getMethod(), _renderInformalParameters, link);
    }
View Full Code Here

        lf.initializeService();

        Map parameters = new HashMap();
        parameters.put(ServiceConstants.SERVICE, "myservice");

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

        verifyControls();

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

        lf.initializeService();

        Map parameters = new HashMap();
        parameters.put(ServiceConstants.SERVICE, "myservice");

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

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

        verifyControls();
    }
View Full Code Here

        lf.initializeService();

        Map parameters = new HashMap();
        parameters.put(ServiceConstants.SERVICE, "myservice");

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

        verifyControls();

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

        Map parameters = new HashMap();
        parameters.put(ServiceConstants.SERVICE, "page");
        parameters.put(ServiceConstants.PAGE, "Barney");

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

        verifyControls();

        assertEquals("/context/Barney.html", link.getURL());
    }
View Full Code Here

        parameters.put(ServiceConstants.SERVICE, "external");
        parameters.put(ServiceConstants.PAGE, "Barney");
        parameters.put(ServiceConstants.PARAMETER, new Object[]
        { Boolean.TRUE });

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

        verifyControls();

        assertEquals("/context/Barney.ext?sp=T", link.getURL());
    }
View Full Code Here

        { barney1, wilma, barney2 }, nested);

        form.setBody(body);

        MockControl linkc = newControl(ILink.class);
        ILink link = (ILink) linkc.getMock();

        IRender render = (IRender) newMock(IRender.class);

        link.getParameterNames();
        linkc.setReturnValue(new String[]
        { "service" });

        link.getParameterValues("service");
        linkc.setReturnValue(new String[]
        { "fred" });

        writer.getNestedWriter();
        writerc.setReturnValue(nested);

        link.getURL(null, false);
        linkc.setReturnValue("/app");

        writer.begin("form");
        writer.attribute("method", "post");
        writer.attribute("action", "/app");
View Full Code Here

                fs.addEventHandler(FormEventType.SUBMIT, "mySubmit3");
            }
        });

        MockControl linkc = newControl(ILink.class);
        ILink link = (ILink) linkc.getMock();

        IRender render = (IRender) newMock(IRender.class);

        link.getParameterNames();
        linkc.setReturnValue(new String[]
        { "service" });

        link.getParameterValues("service");
        linkc.setReturnValue(new String[]
        { "fred" });

        writer.getNestedWriter();
        writerc.setReturnValue(nested);

        link.getURL(null, false);
        linkc.setReturnValue("/app");

        writer.begin("form");
        writer.attribute("method", "post");
        writer.attribute("action", "/app");
View Full Code Here

                fs.setEncodingType("foo/bar");
            }
        });

        MockControl linkc = newControl(ILink.class);
        ILink link = (ILink) linkc.getMock();

        IRender render = (IRender) newMock(IRender.class);

        link.getParameterNames();
        linkc.setReturnValue(new String[]
        { "service" });

        link.getParameterValues("service");
        linkc.setReturnValue(new String[]
        { "fred" });

        writer.getNestedWriter();
        writerc.setReturnValue(nested);

        link.getURL(null, false);
        linkc.setReturnValue("/app");

        writer.begin("form");
        writer.attribute("method", "post");
        writer.attribute("action", "/app");
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.