[Lift] Re: Schemifier broken for Oracle

2010-01-14 Thread aw
I found my issue -- the problem was that I specified DB.globalDefaultSchemaName, and that was interfering with Schemifier. Tried 2.0-SNAPSHOT too, but same issue. I have another thread on trying to change the schema name:

[Lift] Re: Default Schema for DefaultConnectionIdentifier

2010-01-14 Thread aw
OK, I'm not 100% sure what DB.globalDefaultSchemaName is supposed to do because specifying it broke Schemifier as well as my queries. Certainly, it sounded like what I needed, but doesn't do what I expected... Basically, I am looking for the Lift equivalent to: hibernate.default_schema (See

[Lift] Excessive select DISTINCT

2010-01-14 Thread aw
I enabled SQL logging recently, and started looking at the generated SQL from Mapper. I was surprised to see that select DISTINCT was generally being done for queries when it is not necessary. Is that really necessary? For example: Team.findAll(OrderBy(Team.name, Ascending)) translated to:

[Lift] Re: Ajax forms and (multiple) submit buttons

2010-01-14 Thread Marius
Most likely I'll commit it today in master as it was approved by review board. Br's, Marius On Jan 14, 9:53 am, Adam Warski a...@warski.org wrote: I would of course be very +1 to include the ajaxSubmit :). Thanks for the work. This looks a bit different to the button I tried before, maybe

[Lift] Oauth tutorial?

2010-01-14 Thread Mads Hartmann
Hey everyone I'm about to re-write the last part of my project - the communication with twitter :) I can see that lift has an oauth package but I can't seem to find any information regarding how to use it, could anyone point me in the right direction? If you do I promise to create a wiki article

[Lift] Lift Web Framework 2.0 Milestone 1 released

2010-01-14 Thread Indrajit Raychaudhuri
The Lift Web Framework team is pleased to announce the framework-2.0- M1 release! Lift is an expressive and elegant framework for writing web applications. Lift stresses the importance of security, maintainability, scalability and performance while allowing for high levels of developer

Re: [Lift] Oauth tutorial?

2010-01-14 Thread Timothy Perrett
lift-oauth is an OAuth SERVER... you want an OAuth CLIENT. Try dispatch: http://dispatch.databinder.net/About as it already has a twitter client built in. Cheers, Tim On 14 Jan 2010, at 10:20, Mads Hartmann wrote: Hey everyone I'm about to re-write the last part of my project - the

Re: [Lift] Oauth tutorial?

2010-01-14 Thread Mads Hartmann Jensen
Ahhh, didn't know that :) Thanks, Mads Hartmann Jensen On 14/01/2010, at 12.40, Timothy Perrett wrote: lift-oauth is an OAuth SERVER... you want an OAuth CLIENT. Try dispatch: http://dispatch.databinder.net/About as it already has a twitter client built in. Cheers, Tim On 14 Jan

[Lift] Re: Code generation plugin for SBT

2010-01-14 Thread Timothy Perrett
What are you using for code-generation? Cheers, Tim On Jan 12, 4:43 am, Brian Hsu brianhsu@gmail.com wrote: Hello, I'm interested in this project. Just in case that there are someone eles is working on this too. Currently I have started working on the part of generate Lift website

[Lift] (AutoComplete) Problem with onSbmit function

2010-01-14 Thread Mads Hartmann
Hello, I've got a problem when using the AutoComplete widget. Problem I've got three fields which are all autocomplete fields. When i submit the form I check if the three fields aren't blank and have different values If i deliberately enter the same value in

[Lift] How to write test case involving Mapper

2010-01-14 Thread Ferdinand Chan
Hi, I'm writing a unit test for a utility class that will make use of information of a Model class. Here is the sample code for the model class class Category extends LongKeyedMapper[Category] with IdPK{ def getSingleton = Category object parentCategoryId extends MappedLong(this) object

[Lift] Re: (AutoComplete) Problem with onSbmit function

2010-01-14 Thread Mads Hartmann
Aha! There's no function bound to the keyUp event, so the hidden field doesn't update :) On Jan 14, 4:06 pm, Mads Hartmann mads...@gmail.com wrote: Hello, I've got a problem when using the AutoComplete widget. Problem I've got three fields which are all

[Lift] Re: (AutoComplete) Problem with onSbmit function

2010-01-14 Thread Mads Hartmann
Hmm, so you can't use the AutoComplete widget as part of a form if you want it to work if some weirdo comes along who has javascript disabled? On Jan 14, 4:15 pm, Mads Hartmann mads...@gmail.com wrote: Aha! There's no function bound to the keyUp event, so the hidden field doesn't update :) On

Re: [Lift] Re: Backbutton for Ajax

2010-01-14 Thread Alex Boisvert
On Wed, Jan 13, 2010 at 6:10 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I haven't really used Ajax much but it seems to me there are two kinds of changes. 1. Modifying the view, e.g., clicking an emal in Gmail, or Expand All. One can make an analogy to a GET request, in that there's no

Re: [Lift] How to write test case involving Mapper

2010-01-14 Thread Naftoli Gugenheim
category.runSafe { ... } ? - Ferdinand Chanunique...@gmail.com wrote: Hi, I'm writing a unit test for a utility class that will make use of information of a Model class. Here is the sample code for the model class class Category extends

Re: [Lift] Re: Backbutton for Ajax

2010-01-14 Thread Naftoli Gugenheim
If you press delete then back what will happen? - Alex Boisvertalex.boisv...@gmail.com wrote: On Wed, Jan 13, 2010 at 6:10 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I haven't really used Ajax much but it seems to me there are two kinds of changes.

Re: [Lift] Re: Backbutton for Ajax

2010-01-14 Thread Alex Boisvert
Depends on your application. What would it do if it wasn't implemented with AJAX? This isn't a magical feature. It's a feature that allows you to support the back button 1) if it makes sense to you and 2) if you can figure out a way to make it safe for the user. For example, you click the

[Lift] HashMap to JsArray

2010-01-14 Thread martinsema...@googlemail.com
Hi i need some help with a conversation from HashMap to JsArray. I have something like: var m = new HashMap[String, (Int,Int)] and i want to use it in JE.Call as an argument. I think it has to be converted to a JsArray. Some kind of map or fold should fit here, but i dont know how to do it. The

[Lift] developer guide to source code ?

2010-01-14 Thread Yong Lim
can anyone point me to a guide for developers who are interested in digging into the source code of the liftweb? specifically, on how to build it and setting it up in IDE (like eclipse) I was poking around but could not find it. Just clone the source code but it seems like there is no top level

Re: [Lift] HashMap to JsArray

2010-01-14 Thread Ross Mellgren
Haven't compiled or tested it, but here's something that should work: JsArray(m.elements.map { case (k, v) = JsObj(k - JsArray(v._1, v._2)) }: _*) -Ross On Jan 14, 2010, at 11:25 AM, martinsema...@googlemail.com wrote: Hi i need some help with a conversation from HashMap to JsArray. I

Re: [Lift] TextileParser

2010-01-14 Thread David Pollak
On Tue, Jan 12, 2010 at 12:35 AM, aw anth...@whitford.com wrote: Playing around with the TextileParser code, I am using paraFixer. I noticed that bbold/b yields bold HTML. Similarly, emitalic/em yields italic HTML. But strongbold/strong does NOT yield bold HTML... Looks like we need to

Re: [Lift] Excessive select DISTINCT

2010-01-14 Thread David Pollak
Okay... I found the problem and fixed it. The fix will be on review board in a little while. On Thu, Jan 14, 2010 at 12:33 AM, aw anth...@whitford.com wrote: I enabled SQL logging recently, and started looking at the generated SQL from Mapper. I was surprised to see that select DISTINCT was

[Lift] Re: Backbutton for Ajax

2010-01-14 Thread Marius
+1 for this approach but I'd rather opt it for JsCmd cases classes/ objects and not really S/SHtml methods. case class AjaxHash extends JsCmd { ... } you got the idea. Br's, Marius On Jan 14, 8:29 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 6:02 PM, Alex

[Lift] Re: HashMap to JsArray

2010-01-14 Thread martinsema...@googlemail.com
Thanks .elements provides an Iterator. I have added collect to get a Seq and now it works: JsArray( (m.elements.collect.map { case (k, v) = JsObj(k - JsArray(v._1, v._2)) } : _*) ) Martin On 14 Jan., 18:32, Ross Mellgren

Re: [Lift] How to write test case involving Mapper

2010-01-14 Thread Jeppe Nejsum Madsen
Ferdinand Chan unique...@gmail.com writes: Hi, I'm writing a unit test for a utility class that will make use of information of a Model class. Here is the sample code for the model class class Category extends LongKeyedMapper[Category] with IdPK{ def getSingleton = Category object

Re: [Lift] Re: HashMap to JsArray

2010-01-14 Thread Ross Mellgren
Oh sorry, my bad. I think it would be better to do m.toSeq.map ... instead of m.elements.collect.map ... -Ross On Jan 14, 2010, at 3:14 PM, martinsema...@googlemail.com wrote: Thanks .elements provides an Iterator. I have added collect to get a Seq and now it works: JsArray(

[Lift] Re: HashMap to JsArray

2010-01-14 Thread martinsema...@googlemail.com
Ok i now use toList :-). It seems to work on the data itself rather than to construct a new one. Thanks again Martin On 14 Jan., 21:36, Ross Mellgren dri...@gmail.com wrote: Oh sorry, my bad. I think it would be better to do m.toSeq.map ... instead of m.elements.collect.map ... -Ross On

Re: [Lift] HashMap to JsArray

2010-01-14 Thread Jeppe Nejsum Madsen
martinsema...@googlemail.com martinsema...@googlemail.com writes: Hi i need some help with a conversation from HashMap to JsArray. I have something like: var m = new HashMap[String, (Int,Int)] and i want to use it in JE.Call as an argument. I think it has to be converted to a JsArray.

Re: [Lift] Re: HashMap to JsArray

2010-01-14 Thread Naftoli Gugenheim
JsArray((m map { case (k, (v1, v2)) = JsObj(k - JsArray(v1,v2)) }): _*) - Ross Mellgrendri...@gmail.com wrote: Oh sorry, my bad. I think it would be better to do m.toSeq.map ... instead of m.elements.collect.map ... -Ross On Jan 14, 2010, at 3:14 PM,

[Lift] Re: Parcing Json

2010-01-14 Thread Randinn
Well here is the latest iteration of the code: http://paste.pocoo.org/show/165511/ but I'm getting this error Compiling 11 source files to C:\Users\Randin\Documents\Development \weather\target\classes at 1263504637934 [ERROR]weather/snippet/HelloWorld.scala:32: error: value save is not a member

Re: [Lift] Re: Parcing Json

2010-01-14 Thread David Pollak
On Thu, Jan 14, 2010 at 1:37 PM, Randinn rand...@gmail.com wrote: Well here is the latest iteration of the code: http://paste.pocoo.org/show/165511/ but I'm getting this error Compiling 11 source files to C:\Users\Randin\Documents\Development \weather\target\classes at 1263504637934

Re: [Lift] Re: Parcing Json

2010-01-14 Thread Ross Mellgren
Isn't it that the val Observation is being assigned to the (compiler synthesized) Observe singleton object? In either case, no save method. -Ross On Jan 14, 2010, at 4:41 PM, David Pollak wrote: On Thu, Jan 14, 2010 at 1:37 PM, Randinn rand...@gmail.com wrote: Well here is the latest

[Lift] Re: How to write test case involving Mapper

2010-01-14 Thread Ferdinand Chan
Thanks all for quick response. Its working now... Thanks Ferd On Jan 15, 4:29 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Ferdinand Chan unique...@gmail.com writes: Hi, I'm writing a unit test for a utility class that will make use of information of a Model class. Here is the

[Lift] Re: CouchDB module status and tests

2010-01-14 Thread Ross Mellgren
Oh, if anyone who's familiar with or has a vested interest in Record could take a look at the changes in this commit of my branch, I would greatly appreciate it: http://github.com/dpp/liftweb/commit/eba18cbc2fcb1207ede22f0b2234fb47914d1ad0 -Ross On Jan 14, 2010, at 1:28 AM, Ross Mellgren

[Lift] Re: Parcing Json

2010-01-14 Thread Randinn
Thank you both for your explanations it seems assigning val Observation to Observe is a bad idea, what should I do to get the parced information to the Observation map? On Jan 15, 8:42 am, Ross Mellgren dri...@gmail.com wrote: Isn't it that the val Observation is being assigned to the (compiler

[Lift] Re: Parcing Json

2010-01-14 Thread Randinn
http://paste.pocoo.org/show/165532/ On Jan 15, 9:29 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Jan 14, 2010 at 2:26 PM, Randinn rand...@gmail.com wrote: Thank you both for your explanations it seems assigning val Observation to Observe is a bad idea, what should I do to

Re: [Lift] Re: Parcing Json

2010-01-14 Thread David Pollak
On Thu, Jan 14, 2010 at 2:37 PM, Randinn rand...@gmail.com wrote: http://paste.pocoo.org/show/165532/ You have to write code that will copy each of the fields from the case class to the mapper object. On Jan 15, 9:29 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Jan 14,

[Lift] Re: Lift - GAE Version

2010-01-14 Thread __kaveh__
@David Pollak Thanks for your time and answering me! I am evaluating Cloud technologies for a social application - without heavy real-time interaction - GAE appealed to me for easy integration and interaction with other utilities in Google (like Google Docs which is another candidate for us for

Re: [Lift] Re: Lift - GAE Version

2010-01-14 Thread David Pollak
If you like Scala, you might be best served with Scala and Wicket... I believe that Wicket is more GAE friendly than Lift. On Thu, Jan 14, 2010 at 2:45 PM, __kaveh__ kaveh.shahbaz...@gmail.comwrote: @David Pollak Thanks for your time and answering me! I am evaluating Cloud technologies for a

Re: [Lift] Re: Lift and Akka Actors in comparison?

2010-01-14 Thread David Pollak
On Sun, Jan 10, 2010 at 9:00 AM, greekscala hellectro...@gmail.com wrote: Hello, I read only little about AKKA, but I read that the Lift Actors are now decopled and you can use AKKA Akka actors and Lift Actors share the same interface. Scala Actors do not share this interface. Actors or

Re: [Lift] Re: Lift - GAE Version

2010-01-14 Thread Heiko Seeberger
2010/1/14 __kaveh__ kaveh.shahbaz...@gmail.com So for cases like many little web applications that concurrency is not an issue or for technologies like GAE; we should simply fall back to Java? NO! Go for Scala + Lift! Heiko My job: weiglewilczek.com My blog: heikoseeberger.name Follow me:

[Lift] Re: How to write test case involving Mapper

2010-01-14 Thread Ferdinand Chan
One follow up question about using H2 for testing. Assuming I've created a DB in H2 for testing purpose. What I need to do in the beforeAll and afterAll method? My initial thinking is that I need to define the connection manager and schemify all Model in the beforeAll method, like.. override

[Lift] Re: Parcing Json

2010-01-14 Thread Randinn
Ah, I didn't know I was missing that. Right, I'll go back to chapter 6 in the book and see how to accomplish that, thank you for the info. On Jan 15, 9:43 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Jan 14, 2010 at 2:37 PM, Randinn rand...@gmail.com wrote:

Re: [Lift] Re: How to write test case involving Mapper

2010-01-14 Thread David Pollak
Please take a look at the way we test mapper: http://github.com/dpp/liftweb/blob/master/framework/lift-persistence/lift-mapper/src/test/scala/net/liftweb/mapper/MapperSpecs.scala On Thu, Jan 14, 2010 at 3:17 PM, Ferdinand Chan unique...@gmail.com wrote: One follow up question about using H2

Re: [Lift] Re: Lift and Akka Actors in comparison?

2010-01-14 Thread Timothy Perrett
David, have you actually mixed Akka actors with Lift comet actors (that is, akka actors powering our comet)? I keep meaning to try this, but havent yet. Cheers, Tim On 14 Jan 2010, at 22:57, David Pollak wrote: Akka actors and Lift Actors share the same interface. Scala Actors do not share

Re: [Lift] Re: Lift and Akka Actors in comparison?

2010-01-14 Thread David Pollak
On Thu, Jan 14, 2010 at 3:48 PM, Timothy Perrett timo...@getintheloop.euwrote: David, have you actually mixed Akka actors with Lift comet actors (that is, akka actors powering our comet)? I keep meaning to try this, but havent yet. I have not... plus Akka is on Lift 1.1 M6 which is so last

[Lift] Re: Lift and Akka Actors in comparison?

2010-01-14 Thread Timothy Perrett
No no, the Lift version was only frozen in Akka because of the sample app (it was causing problems whilst we went through some growing pains)... I can upgrade it in Akka to 2.0-M1 if you'd like? One would imagine its just a case of composing the Akka Actor into the comet actor? The composition

Re: [Lift] Re: Lift - GAE Version

2010-01-14 Thread Naftoli Gugenheim
Lift has no dependency on it's various optional persistence layers. I don't see any advantage in terms of data layer to not using lift. But I'd like to question your reason for using GAE. I started a project in Lift for GAE which I soon switched away from GAE. As far as I remember there is no

Re: [Lift] Re: Lift - GAE Version

2010-01-14 Thread Wilson MacGyver
I just wanted to point out that clojure would be a nonstarter anyway on GAE. Without threading, you can't use STM as well as some of the killer features of clojure. On Thu, Jan 14, 2010 at 5:45 PM, __kaveh__ kaveh.shahbaz...@gmail.com wrote: Clojure is an elegant language but it is a Lisp and it

[Lift] Re: [netbeans] getting lift-archetype-blank to work inside netbeans

2010-01-14 Thread carlosayam
Thanks, got the 280_port and it works. regards Carlos On Jan 14, 4:52 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Either use an older version of Netbeans or another IDE, or checkout the unsupported 280_port branch from git and mvn clean install. -

[Lift] ConversionRules

2010-01-14 Thread Naftoli Gugenheim
As suggested I am with G-d's help working on a new net.liftweb.http.ConversionRules object, to contain factories for parsers and formatters for date, date-time, time java.util.Date objects. Then LiftRules.formateDate and .parseDate would be deprecated I suppose. One question is how to deal with

[Lift] Re: ConversionRules

2010-01-14 Thread Marius
I'd strongly suggest: 1. All should return Box. In case of parsing failure for example return a Failure. 2. If a param is null, inside your method use (Box !! param) which would give you an Empty if param is null. We should not assume dumb default values for input that doesn't make sense. Br's,