Estándar

Resin : Tutorials : PeriodicTask Tutorial

Resin : Tutorials : PeriodicTask Tutorial: «periodictask tutorial
injection
ioc appconfig

This tutorial demonstrates the creation of a PeriodicTask that performs a task at intervals and collects statistics on it’s performance. An administration interface to the task is provided, and while the task is active the user is shown a ‘temporarily unavailable’ page.

The code for this tutorial provides a full featured example that can be used as a cut-and-paste source for solving real problems. The PeriodicTask keeps detailed statistics, an administration interface is provided with a servlet, and the task can be executed either manually or automatically at timed intervals.»

Estándar

Event Delegation and Event Handlers: Web Development and other stuff

Rob Cherny.Com: JavaScript Event Delegation and Event Handlers: Web Development and other stuff: «JavaScript Event Delegation and Event Handlers»

http://icant.co.uk/sandbox/eventdelegation

Event delegation Element Extension Mootools based


Element.implement({
delegate: function(eventType,rules,prevent){
return this.addEvent(eventType, function(event) {
var target = $(event.target);
var prevent = prevent || true;
for (var selector in rules) {
if (target.match(selector)) {
if (prevent) { event.preventDefault(); }
return rules[selector].apply(this, $A(arguments));
}
}
});
}
});