You can use something like this to send your comet a message from a snippet
for (sess <- S.session) sess.sendCometActorMessage(
"CometClassNameHere", Full("messageAsString"), cometNameIThink
)
Regards.
Diego
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/liftweb/-/xOauoxgBzmUJ.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
--
Diego Medina
Web Developer
(305) 788-4954
di...@fmpwizard.com
http://www.fmpwizard.com
Pete
Pete
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/liftweb/-/niA4NsH4p20J.
Sent from my cell
Diego
On Aug 11, 2011 3:55 PM, "Antonio Salazar Cardozo" <savedf...@gmail.com> wrote:
>
> Yeah it's not actually possible to run it in a snippet, I'm afraid.
I haven't tried this yet but from your comet you can do a SetHtml (id, S.RunTemplate (name here))
And in that template you can have your snippet do the logout
I can expand later tonight when I have more time
Diego
What we're trying to do is put a user suspension/ban into effect. The state is saved to the database and then the user is `kicked'. The suspension/ban is executed by another user (a moderator), travels to an actor, and then the actor sends a message to the various comets telling them they've been kicked. The comet then logs its session out, which destroys the liftSession.
>
> That's where we're getting the nullpointer. A new approach is forming in my mind at the moment, but it would still be awesome if this one could work for simplicity's sake.
> Thanks,
> Antonio
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/liftweb/-/niA4NsH4p20J.
Greetings,I'm attempting to force logout on a user. My flow is as such:1. Comets get sent a BootUser message2. The comet handler for this message calls UserSessions.logout and returns a reload commandHowever, in my logout method I'm attempting to destroy the liftSession (S.session) by calling destroySession. This seems to consistently result in a NullPointerException (at LiftSession.scala:711).
Is there some issue with getting the request/session while in a comet? How can this session properly be destroyed?
thanks,Matt(I am on 2.3-M1)
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To view this discussion on the web visit https://groups.google.com/d/msg/liftweb/-/xOauoxgBzmUJ.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.