Menu
  • HOME
  • TAGS

How do I add scalatest dependency to an existing scala/lift project?

scala,lift,scalatest

It seems that you have specified the dependency of scalatest to be visible only to test package and you code doesn't seems to be located there. So, either change the dependency into build.sbt from test to compile, or better move the testing code into test package.

Specs2 can't see a defined class in lift

scala,lift

Not sitting with a compiler at the moment, but should you not use new as it is a class and not an object? val nodeSeq = Animals.list(...) Should be val nodeSeq = new Animals.list(...) Or you can change class Animals into object Animals. ...

Convert JValue to String in Lift Scala

json,scala,parsing,lift

You can simply use this import net.liftweb.json._ compact(render(x)) Which will give you a json string version of the JValue object in this form String = {"name":"Tim"} ...

What `JObject(rec) <- someJArray` means inside for-comprehension

scala,lift,json4s

You have the following types hierarchy: sealed abstract class JValue { def \(nameToFind: String): JValue = ??? def filter(p: (JValue) => Boolean): List[JValue] = ??? } case class JObject(val obj: List[JField]) extends JValue case class JField(val name: String, val value: JValue) extends JValue case class JString(val s: String) extends JValue...

How to change the value of JSESSIONID after user login in liftweb?

lift,jsessionid,session-fixation

With Lift there are two types of session. There is the container session, and in a Servlet environment that is tied to a JSESSIONID, and there is the LiftSession, which is Lift's abstraction. Lift ties its own session to the container session, but it is not directly responsible for how...

How to make page scoped comet actor in Lift

scala,comet,lift,actor

You need to use the 'name' attribute when you instantiate the comet actor on the page. This should result in new actors being instantiated for each name. You can get at the name assigned to an actor through it's 'name' value. Usually you'll get quicker & better answers on the...

Trouble adding Mapper as dependency in a Lift project

scala,orm,dependencies,lift

It turned out that this is a problem of Eclipse, which cannot setup the dependencies correctly. I had to close the project in Eclipse and delete the hidden files .classpath and .project. Then get into SBT and run eclipse (the project has to use the sbteclipse plugin as described in...

liftweb SetHtml couldn't handle future object in ajaxsubmit

lift,futuretask

SetHtml returns a JsCmd, but in order for that to be sent to the browser it would need to be part of a server response. However, as you are calling it asynchronously there is no response to send it with and therefore the browser never receives it. To fix that...

using lifty (lift in action) with the latest version of scala

scala,configuration,lift,lifty

I agree, lifty got abandoned by now. I actually think you can easily do what you want without it, just use something like a liftweb starting template: github.com/lift/lift_26_sbt – Vasya Novikov Apr 20 at 5:45

What is the lifetime of an object when using Lift?

scala,lift,lifecycle

Go into the scala REPL, enter paste mode (:paste) command, and put in the following: def increment { currentId = currentId + 1 } increment increment var currentId = 0 then try var currentId = 0 def increment { currentId = currentId + 1 } increment increment In the first...

Which LiftResponse class is appropriate for returning an XML based file format?

xml,http,lift

JsonResponse and PlainTextResponse are helpers that ultimately return an InMemoryResponse. You can see the source code here and here respectively. You will notice that PlainTextResponse sets a mimetype of "text/html" which is not necessarily correct for XML. There is also an XmlResponse type that you can investigate here and which...

lift error, method not found

scala,lift,code-snippets

This occurs because the HTML5 parser Lift uses converts all tag and attribute names to lowercase. It is recommended to use either: class="lift:Snippet" or data-lift="Snippet" to avoid that. This was not an issue with the older XHTML parser as that was case sensitive, so you will find some older documentation...