Package org.apache.tapestry

Examples of org.apache.tapestry.IEngine


        _constructor = new ReflectiveEngineConstructor(engineClass);
    }

    public IEngine constructNewEngineInstance(Locale locale)
    {
        IEngine result = _constructor.construct();

        result.setLocale(locale);

        return result;
    }
View Full Code Here


    public IEngine getEngineInstance()
    {
        Locale locale = _localeManager.extractLocaleForCurrentRequest();

        IEngine result = (IEngine) _enginePool.get(locale);

        // This happens when either the pool is empty, or when a session exists
        // but the engine has not been stored into it (which should never happen, and
        // probably indicates an error in the framework or the application).
View Full Code Here

     */

    protected void processValidatorScript(String scriptPath, IRequestCycle cycle,
            IFormComponent field, Map symbols)
    {
        IEngine engine = field.getPage().getEngine();
        IScriptSource source = engine.getScriptSource();
        IForm form = field.getForm();

        Map finalSymbols = (symbols == null) ? new HashMap() : symbols;

        finalSymbols.put(FIELD_SYMBOL, field);
        finalSymbols.put(FORM_SYMBOL, form);
        finalSymbols.put(VALIDATOR_SYMBOL, this);

        Resource location = new ClasspathResource(engine.getClassResolver(), scriptPath);

        IScript script = source.getScript(location);

        // If there's an error, report it against the field (this validator object doesn't
        // have a location).
View Full Code Here

    public void service(WebRequest request, WebResponse response) throws IOException
    {
        _requestGlobals.store(request, response);

        IEngine engine = _engineManager.getEngineInstance();

        // Until we can inject the infrastructure into the engine
        // we do this to let the engine know about it.

        request.setAttribute(Constants.INFRASTRUCTURE_KEY, _infrastructure);

        try
        {
            engine.service(request, response);
        }
        finally
        {
            _engineManager.storeEngineInstance(engine);
        }
View Full Code Here

    public void service(WebRequest request, WebResponse response) throws IOException
    {
        _requestGlobals.store(request, response);

        IEngine engine = _engineManager.getEngineInstance();

        // Until we can inject the infrastructure into the engine
        // we do this to let the engine know about it.

        request.setAttribute(Constants.INFRASTRUCTURE_KEY, _infrastructure);

        try
        {
            engine.service(request, response);
        }
        finally
        {
            _engineManager.storeEngineInstance(engine);
        }
View Full Code Here

        _constructor = new ReflectiveEngineConstructor(engineClass);
    }

    public IEngine constructNewEngineInstance(Locale locale)
    {
        IEngine result = _constructor.construct();

        result.setLocale(locale);

        return result;
    }
View Full Code Here

    public IEngine getEngineInstance()
    {
        Locale locale = _localeManager.extractLocaleForCurrentRequest();

        IEngine result = (IEngine) _enginePool.get(locale);

        // This happens when either the pool is empty, or when a session exists
        // but the engine has not been stored into it (which should never happen, and
        // probably indicates an error in the framework or the application).
View Full Code Here

        String scriptPath = getScriptPath();

        if (scriptPath == null)
            throw Tapestry.createRequiredParameterException(this, "scriptPath");

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

        // If the script path is relative, it should be relative to the Script component's
        // container (i.e., relative to a page in the application).

        Resource rootLocation = getContainer().getSpecification().getSpecificationLocation();
View Full Code Here

    private IScript getParsedScript()
    {
        if (_parsedScript == null)
        {
            IEngine engine = getPage().getEngine();
            IScriptSource source = engine.getScriptSource();

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

            _parsedScript = source.getScript(scriptLocation);
View Full Code Here

    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

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.