Author: abelevich
Date: 2008-04-11 05:45:39 -0400 (Fri, 11 Apr 2008)
New Revision: 7753
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
fix invokeEvent method behavior.
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
---
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-04-11
09:45:08 UTC (rev 7752)
+++
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-04-11
09:45:39 UTC (rev 7753)
@@ -349,7 +349,7 @@
//TODO: remove Bucks
//TODO: to shared library
invokeEvent : function(eventFunc, element, eventName, memo) {
- var result = false;
+ var result;
if (eventFunc) {
element = $(element);
if (element == document && document.createEvent &&
!element.dispatchEvent)
@@ -365,10 +365,14 @@
}
event.eventName = eventName;
+ event.rich = {component:this};
event.memo = memo || { };
-
- var result = eventFunc.call(event);
+ try {
+ result = eventFunc.call(element,event);
+ }
+ catch (e) { LOG.warn("Exception: "+e.Message + "\n[on"+eventName +
"]"); }
}
+ if (result!=false) result = true;
return result;
},
Show replies by date