Examples of IScriptSource


Examples of org.apache.tapestry.engine.IScriptSource

        IRequestCycle cycle,
        IFormComponent field,
        Map symbols)
    {
        IEngine engine = field.getPage().getEngine();
        IScriptSource source = engine.getScriptSource();
        IForm form = field.getForm();

        Map finalSymbols = (symbols == null) ? new HashMap() : symbols;

        finalSymbols.put(FIELD_SYMBOL, field);
        finalSymbols.put(FORM_SYMBOL, form);
        finalSymbols.put(VALIDATOR_SYMBOL, this);

        IResourceLocation location =
            new ClasspathResourceLocation(engine.getResourceResolver(), scriptPath);

        IScript script = source.getScript(location);

        Body body = Body.get(cycle);

        if (body == null)
            throw new ApplicationRuntimeException(
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

    {
        if (_disabled || cycle.isRewinding())
            return;

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

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

        IScript script = source.getScript(scriptLocation);

        Map symbols = new HashMap();

        IEngineService service = engine.getService(Tapestry.DIRECT_SERVICE);
        ILink link = service.getLink(cycle, this, null);
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

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

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

            _parsedScript = source.getScript(scriptLocation);
        }

        return _parsedScript;
    }
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

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

        try
        {
            return source.getScript(scriptLocation);
        }
        catch (RuntimeException ex)
        {
            throw new ApplicationRuntimeException(ex.getMessage(), this, null, ex);
        }
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

    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.engine.IScriptSource

        String scriptPath = getScriptPath();

        if (scriptPath == null)
            throw Tapestry.createRequiredParameterException(this, "scriptPath");

        IScriptSource source = 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).

        Resource rootLocation = getContainer().getSpecification().getSpecificationLocation();
        Resource scriptLocation = rootLocation.getRelativeResource(scriptPath);

        try
        {
            return source.getScript(scriptLocation);
        }
        catch (RuntimeException ex)
        {
            throw new ApplicationRuntimeException(ex.getMessage(), this, getBinding("script")
                    .getLocation(), ex);
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

        if (scriptPath == null && scriptAsset == null)
            throw new ApplicationRuntimeException(HTMLMessages
                    .noScriptPathError());

        IScriptSource source = getScriptSource();

        Resource scriptLocation = null;
        if (scriptPath != null)
        {

            // 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).

            Resource rootLocation = getContainer().getSpecification()
                    .getSpecificationLocation();
            scriptLocation = rootLocation.getRelativeResource(scriptPath);
        }
        else scriptLocation = scriptAsset.getResourceLocation();

        try
        {
            return source.getScript(scriptLocation);
        }
        catch (RuntimeException ex)
        {
            throw new ApplicationRuntimeException(ex.getMessage(), this,
                    getBinding("script").getLocation(), ex);
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

    protected void processValidatorScript(String scriptPath, IRequestCycle cycle,
            IFormComponent field, Map symbols)
    {
        IEngine engine = field.getPage().getEngine();
        IScriptSource source = engine.getScriptSource();
        IForm form = field.getForm();

        Map finalSymbols = (symbols == null) ? new HashMap() : symbols;

        finalSymbols.put(FIELD_SYMBOL, field);
        finalSymbols.put(FORM_SYMBOL, form);
        finalSymbols.put(VALIDATOR_SYMBOL, this);

        Resource location = new ClasspathResource(engine.getClassResolver(), scriptPath);

        IScript script = source.getScript(location);

        // If there's an error, report it against the field (this validator object doesn't
        // have a location).

        PageRenderSupport pageRenderSupport = TapestryUtils.getPageRenderSupport(cycle, field);
View Full Code Here

Examples of org.apache.tapestry.engine.IScriptSource

    public abstract IScriptSource getScriptSource();

    protected void finishLoad()
    {
        IScriptSource source = getScriptSource();

        Resource location = getSpecification().getSpecificationLocation().getRelativeResource(
                "DatePicker.script");

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

Examples of org.apache.tapestry.engine.IScriptSource

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

        Resource rootLocation = getContainer().getSpecification().getSpecificationLocation();
        Resource scriptLocation = rootLocation.getRelativeResource(scriptPath);

        try
        {
            return source.getScript(scriptLocation);
        }
        catch (RuntimeException ex)
        {
            throw new ApplicationRuntimeException(ex.getMessage(), this, null, ex);
        }
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.