Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client not receiving the event #30

Open
harjitdotsingh opened this issue Feb 13, 2013 · 4 comments
Open

Client not receiving the event #30

harjitdotsingh opened this issue Feb 13, 2013 · 4 comments

Comments

@harjitdotsingh
Copy link

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.

@smaldini
Copy link
Owner

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//issues/30.

Stéphane

@andymccullough
Copy link

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

@harjitdotsingh
Copy link
Author

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//issues/30#issuecomment-13832995.

@harjitdotsingh
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants