Package org.apache.tapestry

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


        replayControls();

        f.initializeService();

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

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

        verifyControls();
    }
View Full Code Here

    }

    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

    public ChartAsset(IRequestCycle cycle, IComponent chartProvider)
    {
      super(null, null);
     
        IEngine engine = cycle.getEngine();

        _chartService = engine.getService(ChartService.SERVICE_NAME);
        _chartProvider = chartProvider;
    }
View Full Code Here

    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

        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

        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

            callback.performCallback(cycle);

        // I've found that failing to set a maximum age and a path means that
        // the browser (IE 5.0 anyway) quietly drops the cookie.

        IEngine engine = getEngine();
        Cookie cookie = new Cookie(COOKIE_NAME, email);
        cookie.setPath(engine.getServletPath());
        cookie.setMaxAge(ONE_WEEK);

        // Record the user's email address in a cookie

        cycle.getRequestContext().addCookie(cookie);

        engine.forgetPage(getPageName());
    }
View Full Code Here

     */

    public IPage getPage(IRequestCycle cycle, String pageName)
    {

        IEngine engine = cycle.getEngine();
        Object key = buildKey(engine, pageName);

        IPage result;

        // lock our page specific key lock first
View Full Code Here

     *
     **/

    public IPage getPage(IRequestCycle cycle, String pageName, IMonitor monitor)
    {
        IEngine engine = cycle.getEngine();
        Object key = buildKey(engine, pageName);
        IPage result = (IPage) _pool.retrieve(key);

        if (result == null)
        {
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IEngine

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.