Grails notification

classic Classic list List threaded Threaded
1 message Options
js
Reply | Threaded
Open this post in threaded view
|

Grails notification

js
Hello all 
I am using grails 2.5.2. and I got some problems with sending notifications. I am trying to send notification to every user who is loggedin . So I have some codes in view as 
$.ajax({
async: false,
url: "${g.createLink( controller: 'enquiry', action:'savePhoneCalls')}",
data:$.param(values),
cache:false,
dataType: 'json',
contentType: 'application/json; charset=utf-8',
success: showPhoneCalls(id)
});
 this is my codes in view after some click of check box and the controlller code is 
def savePhoneCalls(){
println "got value from ajax"
println "params values are "+params
def users = Users.findAllByUsrName(params.'phonecalls[]'[1])
println users
Users.executeUpdate("update Users u set u.active=:actv where u.id=:uid",[actv:java.lang.Boolean.TRUE,uid:users.id])
List<String> test=new LinkedList<String>()
def user = Users.executeQuery("select u.id,u.usrId from Users u")
for(def u:user){
test.add(u[0]+"("+u[1]+")")
}
println "json value is "+(test as JSON)
render (test as JSON)
}
and now i want to send the value from json to every user who is logged in but I am not getting any idea to push notification without page reload .Please help. 

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/0f5b7786-6c1a-40b5-b724-12e30aa677e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.