These are the two stack traces for the two registered callbacks in the test case:
Stack Trace for button click (onBeforeSend)
(anonymous function) (script.js.jsf:4)
apply (bridge.uncompressed.js.jsf:122)
(anonymous function) (bridge.uncompressed.js.jsf:484)
(anonymous function) (bridge.uncompressed.js.jsf:363)
(anonymous function) (bridge.uncompressed.js.jsf:240)
broadcast (bridge.uncompressed.js.jsf:483)
(anonymous function) (bridge.uncompressed.js.jsf:1928)
options.onevent (bridge.uncompressed.js.jsf:2243)
sendEvent (jsf.js.jsf:1563)
AjaxEngine.req.sendRequest (jsf.js.jsf:1454)
request (jsf.js.jsf:1955)
fullSubmit (bridge.uncompressed.js.jsf:2308)
submit (bridge.uncompressed.js.jsf:2313)
f.onsubmit (bridge.uncompressed.js.jsf:2456)
Stack trace for button click (onAfterUpdate)
(anonymous function) (script.js.jsf:10)
apply (bridge.uncompressed.js.jsf:122)
(anonymous function) (bridge.uncompressed.js.jsf:484)
(anonymous function) (bridge.uncompressed.js.jsf:363)
(anonymous function) (bridge.uncompressed.js.jsf:240)
broadcast (bridge.uncompressed.js.jsf:483)
(anonymous function) (bridge.uncompressed.js.jsf:1940)
options.onevent (bridge.uncompressed.js.jsf:2243)
sendEvent (jsf.js.jsf:1563)
response (jsf.js.jsf:2200)
onComplete (jsf.js.jsf:1348)
AjaxEngine.req.xmlReq.onreadystatechange (jsf.js.jsf:1329)
I believe the "sendEvent" function is the key for all these cases. Inside that function is the following logic:
var sendEvent = function sendEvent(request, context, status) {
...
if (context.onevent) {
context.onevent.call(null, data);
}
....
With the button, each time this code is run, the onevent callback is set to the function we use to do the callbacks for our APIs:
context: Object
formid: "iceForm"
onerror: function (submitEvent) {
onevent: function (submitEvent) {
render: "@all"
sourceid: "iceForm:_t9"
__proto__: Object
The full onevent function looks like this:
function (submitEvent) {
pageScopedSubmitEventBroadcaster(submitEvent, element);
requestScopedSubmitEventBroadcaster(submitEvent, element);
}
For the inputField, when onblur is triggered, onevent is simply false for all status phases (begin, complete, success), so no callbacks are fired:
context: Object
formid: "iceForm"
onerror: false
onevent: false
render: "@all"
sourceid: "iceForm:_t10"
__proto__: Object
Hitting the Enter key while in the inputText field actually does trigger our event broadcaster.
For the tabs, it's a slightly different problem. There is a function registered with onevent but it's not ours:
context: Object
formid: "iceForm"
onerror: function (submitEvent) {
onevent: function (I){if(I.status=="success"&&t.newValue==g){v();}}
render: "@all"
sourceid: "iceFormyti"
__proto__: Object
Looks to be a YAHOO function (from ace-yui.js) that replaces ours (the onerror function is still ours):
function (I){
if(I.status=="success"&&t.newValue==g){
v();
}
}
This is an issue with the Williams app. They have these events integrated into their notification popup.
(Restricted to icesoft-internal-developers group)