Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Events push sample
Gosu Groovy JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
grails-app removed namespace from call since in events-push 1.0.M2 is added by d…
web-app no message +


This is a simple grails sample project depending on the following plugins:

Event binding in browser

The view eventTesting/index.gsp binds the bagsUpdated topic:

    try {
         var grailsEvents = new grails.Events("${createLink(uri:'')}",{transport:"sse"});
         grailsEvents.on('bagsUpdated', function(data){
    } catch (error) {
        console.log("ERROR: " + error.toString());

and triggers via AJAX

            // Call controller method that emits event when its done
                url: "${createLink(action:'updateBags')}",  

the controller method firing the bagsUpdated event

    class EventTestingController {

        def updateBags(){
            event topic: 'bagsUpdated'
            render "OK"
Something went wrong with that request. Please try again.