Griffon Guide 0.9.5-rc2 - Reference Documentation

# events

## Purpose

Provide application event handlers.

## Examples

    class SampleGriffonAddon {
        def events = [
            NewInstance: { klass, type, instance ->
                if(type != "controller") return
                instance.metaClass.doit = { evt = null ->
                    // action code goes here
                }
            }
        ]
    }

## Description

The `events` property is responsible for providing additional application event handlers. Each event handler is defined by a key (matches the name of the event) and a value (a closure matching the event's arguments).