Examples of IResourceLocation


Examples of org.apache.tapestry.IResourceLocation

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

        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 =
            getContainer().getSpecification().getSpecificationLocation();
        IResourceLocation scriptLocation = rootLocation.getRelativeLocation(scriptPath);

        try
        {
            return source.getScript(scriptLocation);
        }
View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

            return;

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

        IResourceLocation scriptLocation =
            getSpecification().getSpecificationLocation().getRelativeLocation(
                "InspectorButton.script");

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

Examples of org.apache.tapestry.IResourceLocation

        if (LOG.isDebugEnabled())
            LOG.debug("Resolving unknown component '" + _type + "' in " + namespace);

        String expectedName = _type + ".jwc";
        IResourceLocation namespaceLocation = namespace.getSpecificationLocation();

        // Look for appropriate file in same folder as the library (or application)
        // specificaiton.

        if (found(namespaceLocation.getRelativeLocation(expectedName)))
            return;

        if (namespace.isApplicationNamespace())
        {
View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

        if (LOG.isDebugEnabled())
            LOG.debug("Resolving unknown page '" + _simpleName + "' in " + namespace);

        String expectedName = _simpleName + ".page";

        IResourceLocation namespaceLocation = namespace.getSpecificationLocation();

        // See if there's a specification file in the same folder
        // as the library or application specification that's
        // supposed to contain the page.

        if (found(namespaceLocation.getRelativeLocation(expectedName)))
            return;

        if (namespace.isApplicationNamespace())
        {

            // The application namespace gets some extra searching.

            if (found(getWebInfAppLocation().getRelativeLocation(expectedName)))
                return;

            if (found(getWebInfLocation().getRelativeLocation(expectedName)))
                return;

            if (found(getApplicationRootLocation().getRelativeLocation(expectedName)))
                return;

            // The wierd one ... where we see if there's a template in the application root location.

            String templateName = _simpleName + "." + getTemplateExtension();

            IResourceLocation templateLocation =
                getApplicationRootLocation().getRelativeLocation(templateName);

            if (templateLocation.getResourceURL() != null)
            {
                setupImplicitPage(templateLocation);
                return;
            }
View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

        List names = specification.getAssetNames();

        if (names.isEmpty())
            return;

        IResourceLocation specLocation = specification.getSpecificationLocation();

        Iterator i = names.iterator();

        while (i.hasNext())
        {
View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

        if (type == AssetType.EXTERNAL)
            return new ExternalAsset(path, location);

        if (type == AssetType.PRIVATE)
        {
            IResourceLocation baseLocation = specificationLocation;

            // Fudge a special case for private assets with complete paths.  The specificationLocation
            // can't be used because it is often a ContextResourceLocation,
            // not a ClasspathResourceLocation.
View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

        IComponent component,
        IResourceLocation baseLocation,
        String path,
        ILocation location)
    {
        IResourceLocation assetLocation = baseLocation.getRelativeLocation(path);
        IResourceLocation localizedLocation = assetLocation.getLocalization(_locale);

        if (localizedLocation == null)
            throw new ApplicationRuntimeException(
                Tapestry.format(
                    "PageLoader.missing-asset",
View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

     **/

    public ComponentTemplate getTemplate(IRequestCycle cycle, IComponent component)
    {
        IComponentSpecification specification = component.getSpecification();
        IResourceLocation specificationLocation = specification.getSpecificationLocation();

        Locale locale = component.getPage().getLocale();

        Object key = new MultiKey(new Object[] { specificationLocation, locale }, false);

View Full Code Here

Examples of org.apache.tapestry.IResourceLocation

            LOG.debug("Checking for " + templateBaseName + " in application root");

        if (_applicationRootLocation == null)
            _applicationRootLocation = Tapestry.getApplicationRootLocation(cycle);

        IResourceLocation baseLocation =
            _applicationRootLocation.getRelativeLocation(templateBaseName);
        IResourceLocation localizedLocation = baseLocation.getLocalization(locale);

        if (localizedLocation == null)
            return null;

        return getOrParseTemplate(cycle, localizedLocation, component);
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.