src/core/base/wnComponent.js
function () {
			this.e.log&&this.e.log("Attaching default event's handlers...",'system');
			var events = this.getEvents();
			for (e in events)
			{
				var eventName = e.split('-').pop(),
					event = this.getEvent(eventName),
					evtConfig = event.getConfig();

				if (evtConfig.handler != null && this[evtConfig.handler] && typeof this[evtConfig.handler] == 'function')
				{
					event.addListener(this[evtConfig.handler]);
					event.setConfig({ handler: null });
				}

				if (evtConfig.listenEvent != null && e.indexOf('event-module') == -1 && this.hasEvent(evtConfig.listenEvent))
				{
					var listenTo = this.getEvent(evtConfig.listenEvent),
						listenName = evtConfig.listenEvent+'';
					listenTo.addListener(function (e) {
						if (typeof e == 'object'
							&& e.stopPropagation == true)
									return false;
						this.event.emit.apply(this.event,arguments);
					}.bind({ event: event }));
					event.setConfig({ listenEvent: null });
				}
			}
		}
function () {
			this.e.log&&this.e.log("Attaching default event's handlers...",'system');
			var events = this.getEvents();
			for (e in events)
			{
				var eventName = e.split('-').pop(),
					event = this.getEvent(eventName),
					evtConfig = event.getConfig();

				if (evtConfig.handler != null && this[evtConfig.handler] && typeof this[evtConfig.handler] == 'function')
				{
					event.addListener(this[evtConfig.handler]);
					event.setConfig({ handler: null });
				}

				if (evtConfig.listenEvent != null && e.indexOf('event-module') == -1 && this.hasEvent(evtConfig.listenEvent))
				{
					var listenTo = this.getEvent(evtConfig.listenEvent),
						listenName = evtConfig.listenEvent+'';
					listenTo.addListener(function (e) {
						if (typeof e == 'object'
							&& e.stopPropagation == true)
									return false;
						this.event.emit.apply(this.event,arguments);
					}.bind({ event: event }));
					event.setConfig({ listenEvent: null });
				}
			}
		}
function ( ) { this . e . log && this . e . log ( "Attaching default event's handlers..." , 'system' ) ; var events = this . getEvents ( ) ; for ( e in events ) { var eventName = e . split ( '-' ) . pop ( ) , event = this . getEvent ( eventName ) , evtConfig = event . getConfig ( ) ; if ( evtConfig . handler != null && this [ evtConfig . handler ] && typeof this [ evtConfig . handler ] == 'function' ) { event . addListener ( this [ evtConfig . handler ] ) ; event . setConfig ( { handler : null } ) ; } if ( evtConfig . listenEvent != null && e . indexOf ( 'event-module' ) == - 1 && this . hasEvent ( evtConfig . listenEvent ) ) { var listenTo = this . getEvent ( evtConfig . listenEvent ) , listenName = evtConfig . listenEvent + '' ; listenTo . addListener ( function ( e ) { if ( typeof e == 'object' && e . stopPropagation == true ) return false ; this . event . emit . apply ( this . event , arguments ) ; } . bind ( { event : event } ) ) ; event . setConfig ( { listenEvent : null } ) ; } } }
Search for handlers and eventlisteners
of all events of this component.
Search for handlers and eventlisteners of all events of this component .