You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2006/11/29 02:54:45 UTC
svn commit: r480353 - /incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js
Author: jmargaris
Date: Tue Nov 28 18:54:44 2006
New Revision: 480353
URL: http://svn.apache.org/viewvc?view=rev&rev=480353
Log:
now supports onLoad event at creation time
Modified:
incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js
Modified: incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js?view=diff&rev=480353&r1=480352&r2=480353
==============================================================================
--- incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js Tue Nov 28 18:54:44 2006
@@ -159,8 +159,14 @@
xap.mco.McoNamespaceHandler.s_log.debug("Created mco: " + mco);
//TODO info if replacing existing macro?
session.getMcoContainer().put( id, mco );
+
+ //if there is an onload then call it with the MCO itself as the source
+ var onLoadEvent = element.getAttribute('onLoad');
+ if (onLoadEvent){
+ session.getEventHandler().fireEvent('onLoad',onLoadEvent,null,new xap.session.ClientEvent(mco,session));
+ }
+
} catch ( e ) {
- session.handleException(
- e );
+ session.handleException( e );
}
}