Examples of IEngine


Examples of org.apache.tapestry.IEngine

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        if (cycle.isRewinding())
            return;

        IEngine engine = cycle.getEngine();
        IEngineService pageService = engine.getService(Tapestry.PAGE_SERVICE);
        ILink link = pageService.getLink(cycle, getTargetPage());

        writer.beginEmpty("frame");
        writer.attribute("src", link.getURL());
View Full Code Here

Examples of org.apache.tapestry.IEngine

    public ILink constructLink(IEngineService service, boolean post, Map parameters,
            boolean stateful)
    {
        finalizeParameters(service, parameters);
       
        IEngine engine = _requestCycle.getEngine();
       
        ServiceEncoding serviceEncoding = createServiceEncoding(parameters);
       
        // Give persistent property strategies a chance to store extra data
        // into the link.
       
        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

Examples of org.apache.tapestry.IEngine

    private static final long ONE_WEEK_MILLIS = 1000l * 60l * 60l * 24l * 7l;

    public boolean isNewlyAdded()
    {
        IEngine engine = getPage().getEngine();
        Visit visit = (Visit) engine.getVisit();
        Timestamp lastAccess = null;

        if (visit != null)
            lastAccess = visit.getLastAccess();

View Full Code Here

Examples of org.apache.tapestry.IEngine

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        if (_disabled || cycle.isRewinding())
            return;

        IEngine engine = getPage().getEngine();
        IScriptSource source = engine.getScriptSource();

        Resource scriptLocation = getSpecification().getSpecificationLocation()
                .getRelativeResource("InspectorButton.script");

        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);
View Full Code Here

Examples of org.apache.tapestry.IEngine

        return WINDOW_TITLE + ": " + subtitle;
    }

    public boolean isLoggedIn()
    {
        IEngine engine = getPage().getEngine();
        Visit visit = (Visit) engine.getVisit();

        if (visit == null)
            return false;

        return visit.isUserLoggedIn();
View Full Code Here

Examples of org.apache.tapestry.IEngine

        return visit.isUserLoggedIn();
    }

    public boolean isAdmin()
    {
        IEngine engine = getPage().getEngine();
        Visit visit = (Visit) engine.getVisit();

        if (visit == null)
            return false;

        IRequestCycle cycle = getPage().getRequestCycle();
View Full Code Here

Examples of org.apache.tapestry.IEngine

        replayControls();

        f.initializeService();

        IEngine result = f.constructNewEngineInstance(Locale.CANADA_FRENCH);

        assertTrue(result instanceof BaseEngine);
        assertEquals(Locale.CANADA_FRENCH, result.getLocale());

        verifyControls();
    }
View Full Code Here

Examples of org.apache.tapestry.IEngine

        replayControls();

        f.initializeService();

        IEngine result = f.constructNewEngineInstance(Locale.CHINESE);

        assertTrue(result instanceof EngineFixture);
        assertEquals(Locale.CHINESE, result.getLocale());

        verifyControls();
    }
View Full Code Here

Examples of org.apache.tapestry.IEngine

    }

    private IRequestCycle newCycle()
    {
        MockControl enginec = newControl(IEngine.class);
        IEngine engine = (IEngine) enginec.getMock();

        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();

        cycle.getEngine();
        cyclec.setReturnValue(engine);

        engine.getOutputEncoding();
        enginec.setReturnValue("utf-8");

        return cycle;
    }
View Full Code Here

Examples of org.apache.tapestry.IEngine

    public void testStatefulRequest()
    {
        ErrorLog log = newErrorLog();
        WebRequest request = newRequest();
        MockControl enginec = newControl(IEngine.class);
        IEngine engine = (IEngine) enginec.getMock();

        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();

        cycle.getEngine();
        cyclec.setReturnValue(engine);

        engine.getOutputEncoding();
        enginec.setReturnValue("utf-8");
       
        cycle.encodeURL("/context/app?foo=bar&service=myservice");
        cyclec.setReturnValue("{encoded}");
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.