Package org.apache.tapestry

Examples of org.apache.tapestry.IAsset


            if (value == null)
                continue;

            if (value instanceof IAsset)
            {
                IAsset asset = (IAsset) value;

                // Get the URL of the asset and insert that.
                attribute = asset.buildURL(cycle);
            }
            else
                attribute = value.toString();

            writer.attribute(name, attribute);
View Full Code Here


    }
   
    protected void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        boolean disabled = isDisabled();
        IAsset disabledImage = getDisabledImage();

        IAsset finalImage = (disabled && disabledImage != null) ? disabledImage : getImage();

        String imageURL = finalImage.buildURL(cycle);

        writer.beginEmpty("input");
        writer.attribute("type", "image");
        writer.attribute("name", getName());
View Full Code Here

            IRender delegate = getDelegate();

            if (delegate != null)
                delegate.render(writer, cycle);

            IAsset stylesheet = getStylesheet();

            if (stylesheet != null)
                writeStylesheetLink(writer, cycle, stylesheet);

            Iterator i = (Iterator) getValueConverter().coerceValue(
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

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

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

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

     */

    private ComponentTemplate findTemplate(IRequestCycle cycle, Resource resource,
            IComponent component, Locale locale)
    {
        IAsset templateAsset = component.getAsset(TEMPLATE_ASSET_NAME);

        if (templateAsset != null)
            return readTemplateFromAsset(cycle, component, templateAsset);

        String name = resource.getName();
View Full Code Here

        int count = Tapestry.size(_externalScripts);
        for (int i = 0; i < count; i++)
        {
            Resource scriptLocation = (Resource) _externalScripts.get(i);

            IAsset asset = _assetFactory.createAsset(scriptLocation, null);

            String url = asset.buildURL(cycle);

            // Note: important to use begin(), not beginEmpty(), because browser don't
            // interpret <script .../> properly.

            writer.begin("script");
View Full Code Here

    }

    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

        }}

        // Not rewinding, do the real render

        __CLOVER_136_0.S[3295]++;boolean disabled = isDisabled();
        __CLOVER_136_0.S[3296]++;IAsset disabledImage = getDisabledImage();

        __CLOVER_136_0.S[3297]++;IAsset finalImage = ((((disabled && disabledImage != null) ) && (++__CLOVER_136_0.CT[606] != 0)) || (++__CLOVER_136_0.CF[606] == 0))? disabledImage : getImage();

        __CLOVER_136_0.S[3298]++;String imageURL = finalImage.buildURL(cycle);

        __CLOVER_136_0.S[3299]++;writer.beginEmpty("input");
        __CLOVER_136_0.S[3300]++;writer.attribute("type", "image");
        __CLOVER_136_0.S[3301]++;writer.attribute("name", name);
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.