[Lift] HashMap to JsArray

2010-01-14 Thread martinsema...@googlemail.com
Hi i need some help with a conversation from HashMap to JsArray. I have something like: var m = new HashMap[String, (Int,Int)] and i want to use it in JE.Call as an argument. I think it has to be converted to a JsArray. Some kind of map or fold should fit here, but i dont know how to do it. The

[Lift] Re: HashMap to JsArray

2010-01-14 Thread martinsema...@googlemail.com
...@gmail.com wrote: Haven't compiled or tested it, but here's something that should work: JsArray(m.elements.map { case (k, v) = JsObj(k - JsArray(v._1, v._2)) }: _*) -Ross On Jan 14, 2010, at 11:25 AM, martinsema...@googlemail.com wrote: Hi i need some help with a conversation from HashMap

[Lift] Re: HashMap to JsArray

2010-01-14 Thread martinsema...@googlemail.com
On Jan 14, 2010, at 3:14 PM, martinsema...@googlemail.com wrote: Thanks .elements provides an Iterator. I have added collect to get a Seq and now it works: JsArray(        (m.elements.collect.map                    { case (k, v) = JsObj(k - JsArray(v._1, v._2

[Lift] Re: CometActor and JQuery

2010-01-05 Thread martinsema...@googlemail.com
(such as ajaxText) Br's, Marius On Jan 4, 3:36 pm, martinsema...@googlemail.com martinsema...@googlemail.com wrote: Thanks for that Marius, it works, but it is only for the server to client direction. In the generated Html of the ajaxText there is something like: lift_ajaxHandler

[Lift] CometActor and JQuery

2010-01-04 Thread martinsema...@googlemail.com
Hi all if just started exploring Lift and I am playing around with CometActor and Listeneers. I followed Davids Screencast with the Chat Example which works nicely. Now i would like to communicate with the CometActors using my own jQuery code. I don't want to use lifts helpers for that, but want

[Lift] Re: CometActor and JQuery

2010-01-04 Thread martinsema...@googlemail.com
...@googlemail.com martinsema...@googlemail.com wrote: Hi all if just started exploring Lift and I am playing around with CometActor and Listeneers. I followed Davids Screencast with the Chat Example which works nicely. Now i would like to communicate with the CometActors using my own jQuery