Attached is the modules in question...
My tableSize parameter is specified in Home.html along with the component.
I am able to dereference the form and get/set the value of the select component.
I guess I want to get the value of the select and assign it to the ognl
property of my component. I need to do the same onChange.
Your feedback is appreciated.Best regards Ken in nashua
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry
Script - 4.1.3Date: Thu, 1 Nov 2007 09:23:40 -0400
correction...>BUT document.forms.${myFormName} produces undefined at the above
works... But if I have a DIV or SPAN above in a containing html file I am
unable to assign a name to it or dereference it in the document object.
clarification on how to dereference and assign output data to these is
appreciated.Best regards Ken in nashua
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script
- 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400
Folks, I am using simple div/span... no form. When I attempt to index an
element is showing undefined. 1. document.forms[0] produces my form alright and
it has a name BUT document.forms.${myFormName} produces undefined at
runtime ? Why the lapse ? myFormname equates to the actual form name
EVEN this fails... document.forms['${myFormName}'] as undefined 2.
Assignment to <span name='sams as id' show up blank in debugger ? This prevents
me from accessing is using DOM notation. Jesse/Andy... can you assess/advise
the usability of this script? The docs are too scarse on outputs and the
example code in the docs is out of context. How are we suppose to assign values
to a dom element (which I am mapping to an abstract ognl component method
parameter) when accessing/subscripting/dereferencing these in script body is
not even possible? <input-symbol...<let key='... There is no ability to
de-reference variables beyond these thereafter. The docs state this is all
powerful and usable but I oanly see inputs working... I need to manipulate
outputs by setting values to parameters/values in the DOM space... (or setting
properties in the OGNL space) within my script.Can someone give a comprehensive
snippet that shows an authentic assignment within a script to assign to both
parameters/values in the DOM space and setting properties in the OGNL space? I
am trying to pioneer some fertile ground here and happy to produce a new widget
for public consumption based on your framework. Thanks in advance...Best
regards Ken in nashua
Peek-a-boo FREE Tricks & Treats for You! Get 'em!
Peek-a-boo FREE Tricks & Treats for You! Get 'em!
_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it
now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
<?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>
<!-- input-symbols are on the fly inputs specified formal/informal with @Script tag in HTML Template -->
<!-- java method parameters -->
<!-- we operate these within braces {} for ognl properties -->
<input-symbol key="theWidget" class="org.trails.demo.components.Gallery" required="yes"/>
<input-symbol key="theTableSize" required="yes"/>
<!-- this is the bridge where we transfer transform our parameters from html to javascript -->
<!-- lets are variables permitted to be used in the actual javascript below -->
<!-- javascript instance variables -->
<!-- we operate these for values off ognl objects and dom objects -->
<let key="galleryForm">document.forms[0]</let>
<let key="galleryFormId">document.forms[0].id</let>
<let key="box" unique="yes">inlineBox</let>
<let key="numColumns" unique="yes">inlineNumColumns</let>
<let key="tableWidth" unique="yes">${theWidget.tableWidth}</let>
<let key="tableSize" unique="yes">${theWidget.tableSize}</let>
<let key="tWidget" unique="yes">${theWidget}</let>
<body>
<unique>
dojo.require("tapestry.widget.Widget");
dojo.require("dojo.widget.*");
dojo.require("dojo.html.*");
</unique>
function initGallery() {
debugger;
alert(${thisObject});
alert(${galleryForm});
alert(${galleryFormId});
alert("${theWidget.clientId}");
alert("${theWidget}");
alert("${tWidget}");
var imageWidth = 160;
var ${box} = dojo.widget.byId("${theWidget.clientId}");
var componentObjectCB = dojo.html.getContentBox(${galleryForm});
${numColumns} = Math.floor(componentObjectCB.width / imageWidth);
alert("componentObjectCB.width == " + componentObjectCB.width);
alert("componentObjectCB.height == " + componentObjectCB.height);
alert("numColumns == " + ${numColumns});
}
</body>
<initialization>
initGallery();
</initialization>
</script>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]