From further debugging, it seems the object is 'lost in the ether' ie,
there is no reference attached to it when it is created...
Tapestry.Initializer.dateField = function(spec) {
new Tapestry.DateField(spec);
}
It would be very easy to solve this via:
Tapestry.Initializer.dateField = function(spec) {
$T(spec.field).dateField = new Tapestry.DateField(spec);
}
I'm not sure why this isn't the standard for all tapestry-created
javascript objects?
Probably the "they'll never need that" oversight?
cheers, p.
On 15/10/2012 3:26 PM, Paul Stanton wrote:
Hi all,
I always thought you could attain a reference to the associated
javascript object created by the 'Initializer' for tapestry components
via the HTML element somehow?
In this case I am looking for the "Tapestry.DateField" javascript
object for my field "selectedDateElem"
tml:
<t:datefield t:id="selectedDateElem" id="selectedDateElem"
value="myDate" />
alert($T("selectedDateElem")); // <-- [object Object]
alert(typeof $T("selectedDateElem")); // <-- object
alert($T("selectedDateElem").field); // <-- undefined
alert($T("selectedDateElem").dateField); // <-- undefined
alert($T("selectedDateElem").datePicker); // <-- undefined
alert($("selectedDateElem")); // <-- [object HTMLInputElement]
alert(typeof $("selectedDateElem")); // <-- object
alert($T("selectedDateElem").field); // <-- undefined
alert($("selectedDateElem").dateField); // <-- undefined
alert($("selectedDateElem").datePicker); // <-- undefined
Can someone explain what I'm missing?
Thanks.
tapestry 5.3.3
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org