Examples of IEngine


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(fullServletPath, engine.getOutputEncoding(),
                _codec, _request, parameters, stateful);
    }
View Full Code Here

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

Examples of org.apache.tapestry.IEngine

    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

Examples of org.apache.tapestry.IEngine

     */

    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

Examples of org.apache.tapestry.IEngine

    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

Examples of org.apache.tapestry.IEngine

    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

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

Examples of org.apache.tapestry.IEngine

    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

Examples of org.apache.tapestry.IEngine

        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

Examples of org.apache.tapestry.IEngine

    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
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.