Thanks for the answer.
This line does the trick:
newUser.id.asJsExp .
It returns a type net.liftweb.http.js.JE.numToJsExp.
GA
On Nov 9, 2009, at 6:31 PM, Ross Mellgren wrote:
>
> Bring the numToJsExp implicit into scope -- import
> net.liftweb.http.js.JE.numToJsExp
>
> -Ross
>
> On Nov 9, 2
Bring the numToJsExp implicit into scope -- import
net.liftweb.http.js.JE.numToJsExp
-Ross
On Nov 9, 2009, at 12:22 PM, GA wrote:
>
> Hello guys,
>
> I have the following code working ok:
>
> JsonResponse(JsObj("Op" -> 0,"e" -> 0,"id" ->
> newUser.id.toString))
>
> The
Thanks, that did the trick.
Peter
On Oct 2, 11:15 am, Jeppe Nejsum Madsen wrote:
> Peter Robinett writes:
> > Hi all, I'm getting the following error and I think I'm missing
> > something very simple:
> > error: type mismatch;
> > found : List[net.liftweb.http.js.JsExp]
> > required: net.l
Peter Robinett writes:
> Hi all, I'm getting the following error and I think I'm missing
> something very simple:
> error: type mismatch;
> found : List[net.liftweb.http.js.JsExp]
> required: net.liftweb.http.js.JsExp
> JsonResponse(JsObj("results" -> JsArray(packets.map(_.asJs
>
>
Thanks, David.
--~--~-~--~~~---~--~~
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...@googlegroup
On Mon, Jul 13, 2009 at 1:32 PM, Peter Robinett wrote:
>
> Thanks guys, I happened to be looking for this right now.
>
> For those looking to output single Boxed result from findAll, I think
> you would do something like this:
> JsonResponse(JsObj("results" -> Node.find(By(Content.id,
> yourIdQuer
Thanks guys, I happened to be looking for this right now.
For those looking to output single Boxed result from findAll, I think
you would do something like this:
JsonResponse(JsObj("results" -> Node.find(By(Content.id,
yourIdQuery)).openOr(Content).asJs))
The problem is that if the Content row i
On Mon, Jul 13, 2009 at 11:42 AM, fbettag wrote:
>
> JsonResponse(JsObj("results" -> JsArray(Content.findAll.map{ o =>
> o.asJs } :_* )))
>
> this works.
>
Great!
>
> On Jul 13, 8:08 pm, fbettag wrote:
> > WebServices.scala:118: error: type mismatch;
> > found : net.liftweb.http.js.JsExp
>
JsonResponse(JsObj("results" -> JsArray(Content.findAll.map{ o =>
o.asJs } :_* )))
this works.
On Jul 13, 8:08 pm, fbettag wrote:
> WebServices.scala:118: error: type mismatch;
> found : net.liftweb.http.js.JsExp
> required: Iterable[net.liftweb.http.js.JsExp]
> JsObj("resul
WebServices.scala:118: error: type mismatch;
found : net.liftweb.http.js.JsExp
required: Iterable[net.liftweb.http.js.JsExp]
JsObj("results" -> JsArray(Content.findAll.flatMap(_.asJs) :_*
))
^
one error found
On Mon, Jul 13, 2009 at 10:11 AM, fbettag wrote:
>
> i've read almost every topic about JsonResponse and i've played with
> it for the _whole_ day. I don't get it to work and it drives me more
> than nuts by now.
>
> I just want a simple list dumped to json:
>
>def listContents(): JsonRes
11 matches
Mail list logo