Package org.apache.tapestry.engine

Examples of org.apache.tapestry.engine.EngineServiceLink


        if (stateful)
            _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post);

        String fullServletPath = _contextPath + serviceEncoding.getServletPath();
       
        return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(),
                _codec, _request, parameters, stateful);
    }
View Full Code Here


        if (stateful)
            _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post);

        String fullServletPath = _contextPath + serviceEncoding.getServletPath();

        return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(),
                _codec, _request, parameters, stateful);
    }
View Full Code Here

        if (stateful)
            _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post);
       
        String fullServletPath = _request.getContextPath() + serviceEncoding.getServletPath();
       
        return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(),
                _codec, _request, qmap, stateful);
    }
View Full Code Here

        if (stateful)
            _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post);

        String fullServletPath = _contextPath + serviceEncoding.getServletPath();

        return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(),
                _codec, _request, parameters, stateful);
    }
View Full Code Here

    public void testGetURLWithAnchor()
    {
        WebRequest request = newRequest();
        IRequestCycle rc = (IRequestCycle) newMock(IRequestCycle.class);

        EngineServiceLink l = new EngineServiceLink(rc, "/context/servlet", ENCODING, _urlCodec,
                request, buildParameters("myservice", null), false);

        replayControls();

        assertEquals("/context/servlet#anchor", l.getURL("anchor", false));

        verifyControls();
    }
View Full Code Here

    public void testGetURLWithAnchorAndParameters() throws Exception
    {
        WebRequest request = newRequest();
        IRequestCycle rc = newCycle();

        EngineServiceLink l = new EngineServiceLink(rc, "/context/servlet", ENCODING, _urlCodec,
                request, buildParameters("myservice", null), false);

        replayControls();

        assertEquals("/context/servlet?service=myservice#anchor", l.getURL("anchor", true));

        verifyControls();
    }
View Full Code Here

    public void testGetAbsoluteURL() throws Exception
    {
        WebRequest request = newRequest();
        IRequestCycle rc = newCycle();

        EngineServiceLink l = new EngineServiceLink(rc, "/ctx/app", ENCODING, _urlCodec, request,
                buildParameters("myservice", null), false);

        trainGetScheme(request, "HTTP");

        trainGetServerName(request, "TESTSERVER.COM");

        trainGetServerPort(request, 9187);

        replayControls();

        assertEquals("HTTP://TESTSERVER.COM:9187/ctx/app?service=myservice", l.getAbsoluteURL());

        verifyControls();
    }
View Full Code Here

    public void testGetAbsoluteURLWithOverrides() throws Exception
    {
        WebRequest request = newRequest();
        IRequestCycle rc = newCycle();

        EngineServiceLink l = new EngineServiceLink(rc, "/ctx/app", ENCODING, _urlCodec, request,
                buildParameters("myservice", null), false);

        replayControls();

        assertEquals("https://myserver.net:9100/ctx/app?service=myservice", l.getAbsoluteURL(
                "https",
                "myserver.net",
                9100,
                null,
                true));
View Full Code Here

        trainGetServerName(request, "myserver.net");
        trainGetServerPort(request, 80);

        replayControls();

        EngineServiceLink l = new EngineServiceLink(rc, "/ctx/app", ENCODING, _urlCodec, request,
                buildParameters("myservice", null), false);

        assertEquals("/ctx/app?service=myservice#myanchor", l.getURL(
                "http",
                "myserver.net",
                80,
                "myanchor",
                true));
View Full Code Here

        trainGetScheme(request, "http");

        replayControls();

        EngineServiceLink l = new EngineServiceLink(rc, "/ctx/app", ENCODING, _urlCodec, request,
                buildParameters("myservice", null), false);

        assertEquals("https://override.net:8080/ctx/app?service=myservice#myanchor", l.getURL(
                "https",
                "override.net",
                8080,
                "myanchor",
                true));
View Full Code Here

TOP

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

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.