Hello all, I've run
in to a problem with Tapestry/Tacos. I'm using Tapestry 4.0.1 and a
nightly of tacos4-beta-3: tacos4-beta-3-20060509-1708-lib.
The form is a
tacos:AjaxForm. I have a standard Tapestry Submit component that posts the
form with the where the name of the form is
'pageForm'.
The problem is when
we click the button we get a _javascript_ error in the firefox debugger
'setting a property that only has a getter' in the line flagged below.
This script is at net/sf/tacos/ajax/componets/Form.js.
Does anybody have an
idea what the problem is?
Thanks in
advance.
//
// Bypasses normal form event listeners so that the forms default
// event handling mechanisms aren't brutalized by setting event=..
//
// eventType - Type of javascrtipt event (onsubmit/onrefresh/etc..)
// formId - Element id of form
// handler - _javascript_ method reference, takes in an event object
// that we will manipulate here
// advice - Where to add listener, either before or after specified event.
// If not specified the default is after
Tapestry.registerListener = function(eventType, formId, handler, advice) {
if (!advice) advice = "after";
var form = dojo.byId(formId);
if (!form) return;
var newFunc = new Object();
newFunc.applyFormEvent = function(event) {
if (typeof event.invalid_field_handler == "undefined") {
//Here we add behaviour not normally on event
event.form = form; <--- THIS IS THE LINE THAT CAUSES THE EXCEPTION
event.abort = false;
event.cancel_handlers = false;
event.invalid_field_handler = Tapestry.default_invalid_field_handler;
event.invalid_field = function(field, message) {
event.invalid_field_handler.call(window, event, field, message);
};
event.toString = function() {
return "TacosFormSubmitEvent["
+ this.form.name + " "
+ this.type + " "
+ this.abort + "]";
};
}
dojo.debug("Calling form handler");
handler.call(window, event);
}
dojo.event.connect(advice, form,
eventType, newFunc, "applyFormEvent");
tacos.addFormHandler(formId, function(e) { newFunc.applyFormEvent(e); });
}
"Secure Server BSK" made the following
annotations on 07/10/2006 03:44:47 PM
------------------------------"This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately."
==============================
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Tacos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tacos-devel
