Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.IAssetSpecification


        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here


        String propertyName = getValidatedAttribute(
                "property",
                PROPERTY_NAME_PATTERN,
                "invalid-property-name");

        IAssetSpecification ia = _factory.createAssetSpecification();

        ia.setPath(prefix == null ? path : prefix + path);
        ia.setPropertyName(propertyName);

        IComponentSpecification cs = (IComponentSpecification) peekObject();

        cs.addAsset(name, ia);
View Full Code Here

        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here

        new AssetAnnotationWorker().performEnhancement(op, spec, m);

        verifyControls();

        IAssetSpecification as = spec.getAsset("globalStylesheet");
        assertEquals("/style/global.css", as.getPath());
        assertNull(as.getLocation());
        assertEquals("globalStylesheet", as.getPropertyName());
    }
View Full Code Here

        String propertyName = getValidatedAttribute(
                "property",
                PROPERTY_NAME_PATTERN,
                "invalid-property-name");

        IAssetSpecification ia = _factory.createAssetSpecification();

        ia.setPath(prefix == null ? path : prefix + path);
        ia.setPropertyName(propertyName);

        IComponentSpecification cs = (IComponentSpecification) peekObject();

        cs.addAsset(name, ia);
View Full Code Here

     */
    public void testAssets_3_0() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets_3_0.page");

        IAssetSpecification as = cs.getAsset("mycontext");

        assertEquals("context:path/to/context", as.getPath());

        as = cs.getAsset("myprivate");

        assertEquals("classpath:path/to/private", as.getPath());

        as = cs.getAsset("myexternal");

        assertEquals("http://myexternal/asset", as.getPath());

        assertListsEqual(new String[]
        { "mycontext", "myexternal", "myprivate" }, cs.getAssetNames());
    }
View Full Code Here

    public void testAssets() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets.page");

        IAssetSpecification as = cs.getAsset("myasset");

        assertEquals("path/to/asset", as.getPath());
        assertEquals("myProperty", as.getPropertyName());
    }
View Full Code Here

        new AssetAnnotationWorker().performEnhancement(op, spec, m, l);

        verify();

        IAssetSpecification as = spec.getAsset("globalStylesheet");
        assertEquals("/style/global.css", as.getPath());
        assertEquals(new DescribedLocation(r, l.toString()), as.getLocation());
        assertEquals("globalStylesheet", as.getPropertyName());
    }
View Full Code Here

     */
    public void testAssets_3_0() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets_3_0.page");

        IAssetSpecification as = cs.getAsset("mycontext");

        assertEquals("context:path/to/context", as.getPath());

        as = cs.getAsset("myprivate");

        assertEquals("classpath:path/to/private", as.getPath());

        as = cs.getAsset("myexternal");

        assertEquals("http://myexternal/asset", as.getPath());

        assertListEquals(new String[]
        { "mycontext", "myexternal", "myprivate" }, cs.getAssetNames());
    }
View Full Code Here

    public void testAssets() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets.page");

        IAssetSpecification as = cs.getAsset("myasset");

        assertEquals("path/to/asset", as.getPath());
        assertEquals("myProperty", as.getPropertyName());
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.IAssetSpecification

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.