I use custom event handlers for many parts of our application. Tim Tripcony describes this on his blog ... He will most likely (hopefully) answer that ...
Event handlers in my code are as follows:
<xp:eventHandler
id="newbsDoSomething"
submit="true"
event="calledbyid"
refreshMode="complete">
<xp:this.action>
<![CDATA[#{javascript:doSomethingFromSomewhere();}]]>
</xp:this.action>
</xp:eventHandler>
Buttons or other controls execute these events with code that looks like this:
XSP.partialRefreshPost(("#{id:newbsDoSomething}", {
params : {
'$$xspsubmitvalue' : 'something that tells it what to do.'
},
onError : function(err) {
alert('Whatever this method is doing got an error...');
},
onComplete : function() {
})
});
When I make a mistake (once in the blue moon) and the response to the AJAX request contains a stack trace. I want to put a button that does not necessarily display the stack trace on another page.
onError err undefined, . XSP, . Firebug, ?
/Newbs