Well I cannot do anything with this script...

getScript is failing

java.lang.NullPointerException
Stack Trace:

org.apache.tapestry.util.xml.RuleDirectedParser.parse(RuleDirectedParser.java:122) org.apache.tapestry.script.ScriptParser.parse(ScriptParser.java:112) org.apache.tapestry.engine.DefaultScriptSource.parse(DefaultScriptSource.java:88) org.apache.tapestry.engine.DefaultScriptSource.getScript(DefaultScriptSource.java:74) $IScriptSource_114d23ab1b4.getScript($IScriptSource_114d23ab1b4.java) $IScriptSource_114d23ab1b3.getScript($IScriptSource_114d23ab1b3.java) org.apache.tapestry.html.Script.getParsedScript(Script.java:129) org.apache.tapestry.html.Script.renderComponent(Script.java:159) org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)


Here is the source...

Border.html
<span jwcid="@ScriptIncludes" />

<html
        jwcid="[EMAIL PROTECTED]"
        title="ognl:layout.title"
        stylesheet="ognl:assets.stylesheet"   >

<body jwcid="@Body">

<span jwcid="@Script" script="/org/trails/demo/components/CustomHead.script"

                />
....

CustomHead.script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script PUBLIC
        "-//Apache Software Foundation//Tapestry Script Specification 4.0//EN"
        "http://jakarta.apache.org/tapestry/dtd/Script_4_0.dtd";>

<script>
        <include-script 
resource-path="/org/trails/demo/components/CustomHead.js"/>

        <!-- E-Frastructure inputs from @Script in the template -->
<input-symbol key="component" class="org.trails.demo.AdminLayout" required="no"/>
        <input-symbol key="props" required="no" />
        <input-symbol key="form" required="no" />
        <input-symbol key="widget" required="no" />

        <!-- Business Logic -->
        <input-symbol key="scaleWidth" required="no" />
        <input-symbol key="scaleHeight" required="no" />
        <input-symbol key="imageWidget" required="no" />

        <let key="customhead" unique="yes">
                ${component}
        </let>


        <!-- then use: var box = dojo.html.getContentBox(HTMLElement) -->
<!-- use the box values box.width and box.height to perform an ajax call through --> <!-- a tapestry service (better to do on page finish load so that you'll perform --> <!-- a single call, and do it in json). When you receive the message back, then -->
        <!-- you can set the background image for every image you want. -->
        <!-- ...or you can call after the ajax response -->
        <!-- dojo.html.insertCssText(cssStr, doc) -->


        <body>
                <unique>
                        dojo.require("tapestry.widget.Widget");
                        dojo.require("dojo.widget.Manager");
                        dojo.require("dojo.widget.HtmlWidget");
                        dojo.require("dojo.widget.*");
                        dojo.require("dojo.html");
                        dojo.require("dojo.event.*");
                        dojo.require("dojo.uri.Uri");
                        dojo.require("dojo.dom");
                        dojo.require("dojo.style");

dojo.event.connect(tapestry, "loadJson", function(type, data, http, kwArgs){
                                // do your stuff...the data argument is your 
json object
                        });
                </unique>

        </body>

        <initialization>

                window.onload = scaleHeader();

                function scaleHeader() {
                debugger;
                        var elementId = 'header';
                        var headerElement = document.getElementById(elementId);

                        var cb = dojo.html.getContentBox(headerElement);
                        var cb = dojo.html.getPaddingBox(headerElement);
                        var bb = dojo.html.getBorderBox(headerElement);
                        var mb = dojo.html.getMarginBox(headerElement);
                }

                var ${customhead}=${props};
                var selw=dojo.widget.byId("${component}");
tapestry.widget.synchronizeWidgetState("${component}", "CustomHead", ${props}, ${widget.destroy});
        </initialization>
</script>

_________________________________________________________________
More photos; more messages; more whatever. Windows Live Hotmail - NOW with 5GB storage. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to