I dont see the script getting included anywhere...
Aren't you using
http://tapestry.apache.org/tapestry4.1/components/general/script.html ?
Ken nashua wrote:
Still no rendering... on markup of this script.
? Any ideas...
Best regards
Ken in nashua
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 -->
<input-symbol key="id" class="java.lang.String" required="yes"/>
<input-symbol key="props" required="yes" />
<input-symbol key="form" required="yes" />
<input-symbol key="widget" required="yes" />
<!-- Business Logic -->
<input-symbol key="scaleWidth" required="yes" />
<input-symbol key="scaleHeight" required="yes" />
<input-symbol key="imageWidget" required="yes" />
<let key="customhead" unique="yes">
${id}
</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("${id}");
tapestry.widget.synchronizeWidgetState("${id}", "CustomHead",
${props}, ${widget.destroy});
</initialization>
</script>
Customhead.js is empty now...
-------------------------------------------
_________________________________________________________________
Share your special parenting moments!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]