Examples of IEngine


Examples of org.apache.tapestry.IEngine

            return externalURL;

        // Otherwise, the service is responsible for dynamically retrieving the
        // resource.

        IEngine engine = cycle.getEngine();
       
        URL resourceURL = engine.getResourceResolver().getResource(path);
        String checksum = engine.getResourceChecksumSource().getChecksum(resourceURL);
       
        String[] parameters = new String[] { path, checksum };

        AssetService service = (AssetService) engine.getService(Tapestry.ASSET_SERVICE);
        ILink link = service.getLink(cycle, null, parameters);

        return link.getURL();
    }
View Full Code Here

Examples of org.apache.tapestry.IEngine

    public String buildURL(IRequestCycle cycle)
    {
        if (_resolvedURL == null)
        {
            IEngine engine = cycle.getEngine();
            String contextPath = engine.getContextPath();

            _resolvedURL = contextPath + getResourceLocation().getPath();
        }
       
        return _resolvedURL;
View Full Code Here

Examples of org.apache.tapestry.IEngine

    private ISpecificationResolverDelegate _delegate;

    public AbstractSpecificationResolver(IRequestCycle cycle)
    {
        IEngine engine = cycle.getEngine();

        _specificationSource = engine.getSpecificationSource();

        _applicationRootLocation = Tapestry.getApplicationRootLocation(cycle);

        String servletName =
            cycle.getRequestContext().getServlet().getServletConfig().getServletName();

        _webInfLocation = _applicationRootLocation.getRelativeLocation("/WEB-INF/");

        _webInfAppLocation = _webInfLocation.getRelativeLocation(servletName + "/");

        IApplicationSpecification specification = engine.getSpecification();

        if (specification.checkExtension(Tapestry.SPECIFICATION_RESOLVER_DELEGATE_EXTENSION_NAME))
            _delegate =
                (ISpecificationResolverDelegate) engine.getSpecification().getExtension(
                    Tapestry.SPECIFICATION_RESOLVER_DELEGATE_EXTENSION_NAME,
                    ISpecificationResolverDelegate.class);
        else
            _delegate = NullSpecificationResolverDelegate.getSharedInstance();
    }
View Full Code Here

Examples of org.apache.tapestry.IEngine

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

            IResourceLocation scriptLocation =
                getSpecification().getSpecificationLocation().getRelativeLocation(
                    "Rollover.script");
View Full Code Here

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, this, new String[] { getTargetPage() });

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

Examples of org.apache.tapestry.IEngine

        }
    }

    private BSFManager obtainBSFManager(IRequestCycle cycle)
    {
        IEngine engine = cycle.getEngine();
        Pool pool = engine.getPool();

        BSFManager result = (BSFManager) pool.retrieve(BSF_POOL_KEY);

        if (result == null)
        {
            LOG.debug("Creating new BSFManager instance.");

            result = new BSFManager();

            result.setClassLoader(engine.getResourceResolver().getClassLoader());
        }

        return result;
    }
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).

        IResourceLocation rootLocation =
View Full Code Here

Examples of org.apache.tapestry.IEngine

    private static final String SYM_BUTTONNAME = "buttonName";

    protected void finishLoad()
    {
        IEngine engine = getPage().getEngine();
        IScriptSource source = engine.getScriptSource();

        IResourceLocation location =
            getSpecification().getSpecificationLocation().getRelativeLocation("DatePicker.script");

        _script = source.getScript(location);
View Full Code Here

Examples of org.apache.tapestry.IEngine

    public void testNoEncoders()
    {
        ErrorLog log = newErrorLog();
        WebRequest request = newRequest();
        IEngine engine = newEngine();
        IRequestCycle cycle = newCycle();
        IEngineService service = newService("myservice");

        trainGetEngine(cycle, engine);
        trainGetOutputEncoding(engine, "utf-8");
View Full Code Here

Examples of org.apache.tapestry.IEngine

    public void testStatefulRequest()
    {
        ErrorLog log = newErrorLog();
        WebRequest request = newRequest();
        IEngine engine = newEngine();
        IEngineService service = newService("myservice");
        IRequestCycle cycle = newCycle();

        trainGetEngine(cycle, engine);
        trainGetOutputEncoding(engine, "utf-8");
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.