Glad it worked, now to explain why :) :
println() returns Unit
There is an implicit conversion somewhere in Lift that coverts Unit to
a JsCmds.Noop
This is why println() worked fine.
But there is no conversion from what mapper returned to a JsCmd,
So by changing the order in which you do things, you just need to make
sure the last line, the last expression, returns a JsCmd. and before
it you can have as many regular scala method calls as you want.
One more thing, if you need to send two or more JsCmd, like an Alert
and a setHtml, you chain them with an &
like
Alert("Got it!") &
JsCms.SetHtml(...)
Hope that clears things out.
Diego