lift

Is there a nice, safe, quick way to write an InputStream to a File in Scala?

Specifically, I'm saving a file upload to local file in a Lift web app. ...

Scala/Lift Framework runs just over jetty web server?

I am new with Lift and want to know if it is developed to just run with Jetty but no other web server. Any idea? ...

Dispatch functions

What exactly are dispatch functions? I've googled them and all is vague. They seem to just be nested blocks/closures inside of other functions? Speaking from a scala/lift point..but i assume it's universal, i've seen them mentioned in ruby as well. ...

How to add a new page in Lift framework

How can I add a new page in the webapp directory in lift that can be accessed by users? Currently only the index.html can be accessed through http://localhost:8080/ or http://localhost:8080/index.html Say I add a static file newpage.html into webapp dir, then what can I do so users can access it through http://localhost:8080/newpage.ht...

Parsing a dynamic value with Lift-JSON

Let me explain this question with an example. If I have a JSON like the following: {"person1":{"name": "Name One", "address": {"street": "Some Street","city": "Some City"}}, "person2":{"name": "Name Two", "address": {"street": "Some Other Street","city": "Some Other City"}}} [There is no restriction on the number of perso...

Different Scala Actor Implementations Overview

I'm trying to find the 'right' actor implementation for my thesis. I realized there is a bunch of them and it's a bit confusing to pick one. Personally I'm especially interested in remote actors, but I guess a complete overview would be helpful to many others. This is a pretty general question, so feel free to answer just for the impleme...

OpenSSL compatible API for Scala?

Hello, I'm working on a project with a friend. He's implementing his software in Ruby and I'm doing my stuff in Scala (with Lift). We're using some asynchronous encryption and he is using the ruby OpenSSL bindings for that: key = OpenSSL::PKey::RSA.generate(4096) self.public_key = key.public_key self.private_key = key What I'm loo...

Dynamic bind in Lift framework

I am newbie to Lift and I have a question on using bind, Ajax in Lift. I want to create three dropdown menus using Ajax in a dynamic fashion. I use "Address" as an example to describe what I am trying to achieve. At fist, I only have to display "Country" menu with default set to "None". The user at this point can choose to submit if she...

rewrite not a member of LiftRules

Hi guys, I was following http://www.assembla.com/wiki/show/liftweb/URL_Rewriting tutorial for url rewritting in liftweb.. but I get this error: error: value rewrite is not a member of object net.liftweb.http.LiftRules .. it is really odd.. and the documentation says that it exists. I'm using idea IDE, and I've done everything from sc...

Where can I find experienced Scala / GWT contract engineers?

I'm an ex-Googler building a Scala / GWT based web app and need three contract engineers for three months to help out. Where can I find top Scala / GWT talent? ...

Having a white space issue with scala, I think?

I'm trying to write a script to make generating Lift projects quicker but I believe i'm running into a white space issue. val strLiftGen = "mvn archetype:generate -U\-DarchetypeGroupId=net.liftweb\ -DarchetypeArtifactId=lift-archetype-blank\ -DarchetypeVersion=1.0\ -DremoteRepositories=http://scala-tools.org/repo-releases\-DgroupId="...

What is a good architecture for a Lift-JPA application?

I was wondering what is the best practice for a JPA model in Lift? I noticed that in the jpa demo application, there is just a Model object that is like a super object that does everything. I don't think this can be the most scalable approach, no? Is it is wise to still do the DAO pattern in Lift? For example, there's some code that loo...

Lift XML Parsing Error

I know there are other questions on this and I have read through almost all of them and none of them solved my problem. I have inside a home directory: def search(in: NodeSeq) : NodeSeq = { bind("work", in, "docId" -> text("", did = _), "visitId" -> text("", vid = _), "provider" -> text("", prov = _), "...

Did they remove the automatic user authentication from liftweb 2.0 snapshot?

I just started a liftweb project and decided to go version 2.0 and it didn't seem to generate. Though I could be missing something. ...

Help Connecting lift to an Oracle Database

So I have something like this in my boot.scala: object DBVendor extends ConnectionManager { def newConnection(name: ConnectionIdentifier): Box[Connection] = { try { Class.forName("oracle.jdbc.driver.OracleDriver") val dm = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:orcl", "username", "password"); Fu...

scala: Adding attributes (odd and even rows) to xml table

In a Lift application, I’d like to add a special tag which takes the <tbody> part of the next table and adds odd and even classes (for example) to each <tr> tag. Alternating, of course. While I have found a way to add another attribute to all <tr> tags, there are still a few problems left (see code below). First, it doesn’t work. cycle....

Getting the URL of a model in Lift

I'm coming at Lift from a Django point of view, so in Django parlence, I'm trying to find the Lift equivalent of reverse. In generic terms, I have an instance of a model and I would like to get the URL that that model can be accessed at according to the SiteMap. I've tried extending Loc, but that doesn't seem to have brought me further...

Possible to not use ID field but another column name? in Lift

I am connected to a oracle database from a scala/lift webapp. I have been able to successfully pull information from the database as I wished but am having one issue. For each table I want to access I am required to add an ID field so that the app will work with the trait IdPK. What mapper class or trait can I use to override this? I...

where do i put html files in my web-app folder for a lift project with maven?

I'm new to Lift framework for scala. For some reason, index.html resides in the web-app directory, and when I start up jetty, http://localhost:8080/ will point to that index.html file just fine. However, if I put a login.html file in the same folder as the index.html, and then go http://localhost:8080/login, Lift does not serve the file....

What is a good tool for unit testing javascript in a maven webapp / liftweb project?

I want to unit test the javascript I have embedded in the webapp portion of my liftweb project. Liftweb is a subset of the maven webapp archetype, so my question applies to that framework as well. By 'good', I mean that the tests can be integrated into the maven automated testing. I understand that different browsers support different...