Package org.apache.tapestry.engine

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


    {
        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

              getBinding("scriptPath")));
       
        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

    /**
     * No input symbols, no informal parameters.
     */
    public void testMinimalRender()
    {
        IScriptSource source = newScriptSource();
        IScript script = newScript();

        PageRenderSupport support = newPageRenderSupport();
        IRequestCycle cycle = newCycle(false);
        IMarkupWriter writer = newWriter();
View Full Code Here

        verifyControls();
    }

    public void testWithSymbolsMap()
    {
        IScriptSource source = newScriptSource();
        MockScript script = new MockScript();

        PageRenderSupport support = newPageRenderSupport();
        IRequestCycle cycle = newCycle(false);
        IMarkupWriter writer = newWriter();
View Full Code Here

        assertNotSame(baseSymbols, script._symbols);
    }

    public void testWithSymbolsMapAndInformalParameters()
    {
        IScriptSource source = newScriptSource();
        MockScript script = new MockScript();

        PageRenderSupport support = newPageRenderSupport();
        IRequestCycle cycle = newCycle(false);
        IMarkupWriter writer = newWriter();
View Full Code Here

        verifyControls();
    }

    public void testMultiParamException()
    {
      IScriptSource source = newScriptSource();
       
        PageRenderSupport support = newPageRenderSupport();
        IRequestCycle cycle = newCycle(false);
        IMarkupWriter writer = newWriter();
        IRender body = newRender();
View Full Code Here

        verifyControls();
    }
   
    public void testIAssetParamRender()
    {
        IScriptSource source = newScriptSource();
        IScript script = newScript();
       
        PageRenderSupport support = newPageRenderSupport();
        IRequestCycle cycle = newCycle(false);
        IMarkupWriter writer = newWriter();
View Full Code Here

                            getBinding("script")));

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

        IScriptSource source = getScriptSource();
       
        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();

            scriptAsset = getAssetSource().findAsset(rootLocation, getContainer().getSpecification(), scriptPath, getPage().getLocale(), getScriptLocation());
        }

        Defense.notNull(scriptAsset, "script");

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

        final Resource scriptResource = componentSpecLocation.getResource().getRelativeResource(
                "bar.script");

        final Location injectSpecLocation = newLocation();

        final IScriptSource source = (IScriptSource) newMock(IScriptSource.class);

        op.claimReadonlyProperty("foo");

        op.getPropertyType("foo");
        opc.setReturnValue(IScript.class);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.engine.IScriptSource

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.