lift

How to set an empty value in a lift select element?

Hi people, I am trying to set an empty value (as a first choice) in a lift select element: SHtml.select(("", "") :: (MyObject.findAll(By(MyObject.creator, User.currentUser.open_!.id))), ... However it gives me this error: error: type mismatch; found: List[(String, java.lang.Object)] required: Seq[(String, String)] Any ideas? Thanks...

Scala framework for a Rest API Server?

Hi, We are thinking on moving our Rest API Server (it is inside the web service, on Symfony PHP) to Scala for several reasons: speed, no overhead, less cpu, less code, scalability, etc. I did't know Scala until several days ago but I've been enjoying what I've been learning these days with the Scala book and all the blog posts and quest...

Having trouble converted a scala case class to json JObject when it contains an field of type Enumeration

In Scala 2.8 and liftweb.net 2.0 I'm trying to serialize a case-class to Json but when the case class has an enumeration in it it fails. import net.liftweb.json.DefaultFormats import net.liftweb.json.Extraction._ import net.liftweb.json.JsonDSL._ import net.liftweb.json.JsonAST.JObject // Enumerated type object ColorType extends scal...

Can you recommend a good shared hosting provider for a webapp made with Lift framework with Scala 2.8?

I've got acquainted with Scala recently and found it beautiful. I am willing to give up using PHP and use Scala instead for all projects of mine. Now I Use BlueHost for hosting my PHP-based sites. Can you recommend a good alternative that will support Scala? ...

Lift - Page displays as XML in Firefox rather than HTML

I'm trying to get a simple Lift example running and I'm having a strange issue. I am using the Sonatype sample list project here. I modified the HTML slightly, but it wasn't working originally either. The issue I'm having is that when I run the local jetty server and try to access http://localhost:8080 it displays as XML in Firefox 3.6.1...

How to use dispatch.json in lift project

i am confused on how to combine the json library in dispatch and lift to parse my json response. I am apparently a scala newbie. I have written this code : val status = { val httpPackage = http(Status(screenName).timeline) val json1 = httpPackage json1 } Now i am stuck on how to parse the twitter json r...

Develop a Scala/Lift Web App using Eclipse and Tomcat

So I have spent the past 11 hours now trying to get even the simplest Scala/Lift app to run on Tomcat through Eclipse. Apparently no one is trying to do this or it is the easiest thing in the world so no one has documented how they did it. Creating the code using a maven archetype and running it with mvn tomcat:run is no problem. Making ...

Improve sbt doc generation

When I run sbt doc, it results in a nice but nonetheless pretty basic documentation. Is it possible to a) include the source files for the class definition and b) inherit the docstrings for inherited members? What do I need to add to my project definition? (It’s a Lift project, so most important would be to have the inherited Lift d...

how to extract from dispatch.json.JsObject

What do i need to do to extract the value for friends_count. i noticed that screen_name are already define in the Status object and case class. Do still require to extends Js or JsObject different object TweetDetails extends Js { val friends_count = 'friends_count ? num } and then pattern match it against each json object in the list...

Can I use the Scala lift-json library to parse a JSON into a Map?

Is there a way to use the lift-json library's JObject class to act like a Map? For example: val json = """ { "_id" : { "$oid" : "4ca63596ae65a71dd376938e"} , "foo" : "bar" , "size" : 5} """ val record = JsonParser.parse(json) record: net.liftweb.json.JsonAST.JValue = JObject(List(JField(_id,JObject(List(JField($oid,JString(4ca63596ae6...

How do I keep focus on a textbox using Lift (the Scala framework)?

Hi all, Pardon my excruciatingly simple question, but I'm quite new to the world of Lift (and Scala, for that matter). I'm following the "Getting Started" tutorial on the Lift website: http://liftweb.net/getting_started I've got it up and running but I'd like to make a quick modification to the app so that every time I press enter in...

How to create a table with an unknown (at build-time) number of columns

For simplicity, imagine that I have a list of lists. I want to display a html table where there is a row for each element of the top-level list and each column in the row is an element of the child list. So List(List(1,2,3), List(4,5,6), List(7,8,9)) would result in an html table that is displayed like this: 1 2 3 4 5 ...

Is there a Lift cheatsheet / quickref ?

I found a couple of blogs on how to get started with Lift, but I need a quick reference. Something like: here you define the application map, this is how to write snippets, etc. I want to start a Lift app that is not "hello world" and I need the tl;dr version :) ...

PHP or Lift framework for a web application?

Hi guys! I'm currently developing a web application using PHP, but I'm considering developing the web application using the lift framework instead, because twitter and foursquare have implemented it. I know a few benefits using lift/Scala but, could you guys mention some benefits compared to PHP? Many thanks ...

Forms in Lift with JPA models

Hi, there is .toForm in every Mapper field. How do you do this (create forms from models) in JPA models? Thanks in advance, Etam. ...

Which is better framework Java/GWT or Scala/Lift ?

Hi folks, I wanted to start a new web application project and I am confused between two frameworks that is GWT(Java) or Lift(Scala). So I want your opinion which one I choose? Both are good according to my project requirement. So on the basis of frameworks comparison please tell me which is good? ...

Lift MapperField Objects

Hi, Why the mapper fields in Lift framework is defined as Objects inside the class? Why not them as vals? When I look at their Wiki page, it says that for some internal reasons of Scala, we are making them as Objects instead of val or var. What is the internal reason or hinderence in Scala? ...

Frameworks comparation: Lift, Play and Wicket

What are the advantages and dis­advantages of frameworks Lift, Play and Wicket? What characteristics are best or only supported by each? Thanks ...

Redirecting to search params in lift

I have a search box that sends an ajax request to a snippet. When the snipped function gets called I would like the search query to get added to the URL via a anchor hash (ala: http://localhost/search#param) so I can recreate the search request if the user copies the URL and comes back later. Obviously the other side to this is pulling t...

How to get a reference to a Lift MetaMapper object by name?

In modeling an audit table, I've included fields necessary to find the original record being audited (oid: String, className: String). I'd like to programmatically find the MetaMapper for the Mapper class name. For example, if I have: class Foo extends Mapper[Foo] { def getSingleton = Foo } object Foo extends Foo with MetaMapper[Fo...