grails-events-push icon indicating copy to clipboard operation
grails-events-push copied to clipboard

Client not receiving the event

Open harjitdotsingh opened this issue 12 years ago • 4 comments

I have the following code

events = {

"processed" namespace: 'browser', browser: true

}

code in the service def map= [:] map.json = data event('processed',map,{})

code on the client

var grailsEvents = new grails.Events('${createLink(uri: '')}', {transport:'sse'}); grailsEvents.on('processed', function(data){ alert("received Push") });

I don't see anything on the client.

harjitdotsingh avatar Feb 13 '13 14:02 harjitdotsingh

You may want to try event for:'browser' , topic:'processed', data:[:] //if required, you should be able to just use for and topic arguments.

On Wed, Feb 13, 2013 at 2:42 PM, harjitdotsingh [email protected]:

I have the following code

events = {

"processed" namespace: 'browser', browser: true

}

code in the service def map= [:] map.json = data event('processed',map,{})

code on the client

var grailsEvents = new grails.Events('${createLink(uri: '')}', {transport:'sse'}); grailsEvents.on('processed', function(data){ alert("received Push") });

I don't see anything on the client.

— Reply to this email directly or view it on GitHubhttps://github.com/smaldini/grails-events-push/issues/30.

Stéphane

smaldini avatar Feb 13 '13 14:02 smaldini

for your event call in your service, try event(topic:'processed', data:data)

andymccullough avatar Feb 20 '13 14:02 andymccullough

Sure... let me try that and see.

On Wed, Feb 20, 2013 at 9:04 AM, andymccullough [email protected]:

for your event call in your service, try event(topic:'processed', data:data)

— Reply to this email directly or view it on GitHubhttps://github.com/smaldini/grails-events-push/issues/30#issuecomment-13832995.

harjitdotsingh avatar Feb 20 '13 14:02 harjitdotsingh

Will this work on jboss as?

On Feb 20, 2013, at 9:04 AM, andymccullough [email protected] wrote:

for your event call in your service, try event(topic:'processed', data:data)

— Reply to this email directly or view it on GitHub.

harjitdotsingh avatar Feb 21 '13 00:02 harjitdotsingh