Package org.apache.tapestry

Examples of org.apache.tapestry.IAsset


    }

    private IAsset newAsset(IRequestCycle cycle, String url)
    {
        MockControl control = newControl(IAsset.class);
        IAsset asset = (IAsset) control.getMock();

        asset.buildURL(cycle);
        control.setReturnValue(url);

        return asset;
    }
View Full Code Here


        MockControl assetFactoryc = newControl(AssetFactory.class);
        AssetFactory assetFactory = (AssetFactory) assetFactoryc.getMock();

        Resource script1 = newResource();
        IAsset asset1 = newAsset(cycle, "/script1.js");
        Resource script2 = newResource();
        IAsset asset2 = newAsset(cycle, "/script2.js");

        assetFactory.createAsset(script1, null);
        assetFactoryc.setReturnValue(asset1);

        assetFactory.createAsset(script2, null);
View Full Code Here

public class TestImageSubmit extends BaseFormComponentTest
{
    protected IAsset newAsset(IRequestCycle cycle, String imageURL)
    {
        MockControl control = newControl(IAsset.class);
        IAsset asset = (IAsset) control.getMock();

        asset.buildURL(cycle);
        control.setReturnValue(imageURL);

        return asset;
    }
View Full Code Here

        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();
        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
        IMarkupWriter writer = newWriter();
        IAsset image = newAsset(cycle, "image-url");

        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
        { "image", image });
View Full Code Here

        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();
        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
        IMarkupWriter writer = newWriter();
        IAsset image = newAsset(cycle, "disabled-image-url");

        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
        { "disabledImage", image, "disabled", Boolean.TRUE });
View Full Code Here

        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();
        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
        IMarkupWriter writer = newWriter();
        IAsset image = newAsset(cycle, "image-url");

        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
        { "image", image, "disabled", Boolean.TRUE });
View Full Code Here

        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();
        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
        IMarkupWriter writer = newWriter();
        IAsset image = newAsset(cycle, "image-url");

        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
        { "image", image, "nameOverride", "barney" });
View Full Code Here

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

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

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

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

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

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

        {
            writer.begin("a");
            writer.attribute("href", (String) symbols.get(SYM_BUTTONONCLICKHANDLER));
        }

        IAsset icon = getIcon();

        writer.beginEmpty("img");
        writer.attribute("src", icon.buildURL(cycle));
        writer.attribute("border", 0);

        if (!disabled)
            writer.end();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IAsset

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.