Yes looks like this is exactly what you would need. Please see partialUpdate from CometActor. As an example you can see sites/example/ src/main/scala/net/liftweb/example/comet/Clock.scala. partialUPdate function returns a JsCmd but there are of course implicit conversions between JsExp and JsCmd.
What you're trying to do seems like an interesting thing for a Lift demo app in the sense that it would provide an interesting visual effect through CometActor. Br's, Marius On May 31, 4:46 am, Xavi Ramirez <xavi....@gmail.com> wrote: > I'm trying add some comet features to an existing JS app. Essentially, > I want to drag/drop a widget and have my movements reflected on other > user's browsers. > > You mentioned that a CometActor can cause JsExp to be executed. This > might be what I'm looking for. How does that work? > > Thanks, > Xavi > > On Sat, May 30, 2009 at 5:02 PM, marius d. <marius.dan...@gmail.com> wrote: > > > Lift generates the JavaScript for Comet so you essentially don't have > > to worry about it. From a CometActor you just provide the markup that > > you need to render asynchronously or just the JsExp to be executed by > > browser. > > > However could you please provide an overview of what you're trying to > > achieve? > > > P.S. > > By default Lift's Ajax/Comet support works against JavaScript content > > type responses and not JSON. However you can use JSON as well. > > > Br's, > > Marius > > > On May 30, 3:12 pm, Xavi Ramirez <xavi....@gmail.com> wrote: > >> Hello, > > >> I was wondering if Lift provides a javascript interface to comet? > >> Ideally it would look something like this: > > >> lift.getComet("comet-name").addListener(callback); // callback takes a > >> json object > >> lift.getComet("comet-name").postMessage(jsonObj); > > >> Thanks, > >> Xavi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---