LMS

Welcome to the Lobeo Module Server project. Please feel free to submit bugs related to it.
Tasklist

FS#183 - Event delegation

Attached to Project: LMS
Opened by Guillaume (Guillaume) - Tuesday, 02 August 2011, 18:21 GMT
Last edited by Guillaume (Guillaume) - Wednesday, 25 April 2012, 07:31 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Guillaume (Guillaume)
Operating System All
Severity Medium
Priority High
Reported Version alpha3
Due in Version alpha5
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,



For the UIToolkiy, in some cases, it should be useful to delegate the CLICK event to the parent component (or another).

Implement somthing like that:
child.delegate('CLICK', parent);

The use case is :

Share a component to multiple model instance, but you don't want to share the CLICK event. (ie, when one click on the component, you don't want to do the same thing on others models)

Guillaume
This task depends upon

Closed by  Guillaume (Guillaume)
Wednesday, 25 April 2012, 07:31 GMT
Reason for closing:  Invalid
Comment by Guillaume (Guillaume) - Tuesday, 02 August 2011, 18:23 GMT
Maybe create another event name : DELEGATE_CLICK ?
Comment by Guillaume (Guillaume) - Monday, 06 February 2012, 22:45 GMT
Another solution is to add an event listener to the client :

client.addEventListener(component, function(topic) {
// code here
});

Loading...