[Lift] Re: Mapper <-> JObject bridge

2009-12-16 Thread Joni Freeman
Hi, Yes, that's a way to convert JSON AST to string and vice versa. All functions in lift-json operate on AST instances. This is lets us post- and pre-process JSON in many ways before converting it to string. See for instance functions map, merge, diff, \, etc. defined in JsonAST (scaladocs still

Re: [Lift] Re: Mapper <-> JObject bridge

2009-12-16 Thread Xuefeng Wu
Thanks, Joni. On Wed, Dec 16, 2009 at 4:24 PM, Joni Freeman wrote: > Hi, > > Yes, that's a way to convert JSON AST to string and vice versa. All > functions in lift-json operate on AST instances. This is lets us post- > and pre-process JSON in many ways before converting it to string. See > for i

Re: [Lift] [ANN] Lift 1.1-M8

2009-12-16 Thread Xuefeng Wu
anyone will add the source.jar? On Wed, Dec 16, 2009 at 3:33 AM, Jim McBeath wrote: > It looks like the source jars are missing from the M8 repository, at > least for some of the libraries (for example, > ). > > Are these perhap

[Lift] lift_successRegisterGC()

2009-12-16 Thread Alex Black
I see the following javascript on each of my pages in my site: // I don't think its necessary for what I'm doing, is there a way to turn off this feature? Thanks! - Alex -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send em

Re: [Lift] lift_successRegisterGC()

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 5:47 AM, Alex Black wrote: > I see the following javascript on each of my pages in my site: > > // > > I don't think its necessary for what I'm doing, is there a way to turn > off this feature? > Are you using any Comet or Ajax or any Lift generated form elements? If yo

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
> Are you using any Comet or Ajax or any Lift generated form elements?  If you > are using any of these (anything where Lift is storing a function on the > server-side and presenting the function as a GUID on the client side), then > it is strongly advised that you enable GC. We're not using Comet

Re: [Lift] Re: How to disable XHTML?

2009-12-16 Thread Indrajit Raychaudhuri
On 15/12/09 6:31 PM, Tim Nelson wrote: > You need to remove the if guard on the first case match and change the > second parameter you are passing to Req. The second param is for the > context. Try this: > > LiftRules.determineContentType = { >case (Full(Req("location" :: "maps" :: "testmap" ::

Re: [Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-16 Thread Indrajit Raychaudhuri
Wonderful, and thanks for the credits! Cheers, Indrajit On 15/12/09 11:49 PM, Timothy Perrett wrote: > Awesome Dave! Thanks for the acknowledgement. > > Cheers, Tim > > On 15 Dec 2009, at 18:07, Dave Briccetti wrote: > >> Thanks again for the help. Here are tho talk slides: >> http://www.slidesha

[Lift] Confused about validation

2009-12-16 Thread greekscala
Hello lift people, lift seems very promising. I am trying to make some tests and examples because I am new to lift. I wanted to add some validation to a form element and show the validation error to the user. But after little searching I was a little disappointet to see that there is no such suppo

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
Hi David, is there a way to turn off the output of this javascript code? On Dec 16, 8:51 am, David Pollak wrote: > On Wed, Dec 16, 2009 at 5:47 AM, Alex Black wrote: > > I see the following javascript on each of my pages in my site: > > > // > > > I don't think its necessary for what I'm doing,

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-16 Thread Alex Black
Hey Dave, great site, beautiful photography. If you had time you might add some URL rewriting, so that galleries had nice urls like: http://briccettiphoto.com/show/galleries/kenya - Alex On Dec 13, 1:44 am, Dave Briccetti wrote: > For a lightning talk at Bay Area Scala Enthusiasts at Twitter H

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
I found this in another thread: LiftRules.enableLiftGC = false On Dec 16, 12:55 pm, Alex Black wrote: > Hi David, is there a way to turn off the output of this javascript > code? > > On Dec 16, 8:51 am, David Pollak > wrote: > > > On Wed, Dec 16, 2009 at 5:47 AM, Alex Black wrote: > > > I

[Lift] Re: Duplicate Keys Created by Schemefier

2009-12-16 Thread Peter Robinett
Fair enough, but isn't this still a non-optimal situation with the MySQL database driver? Peter On Dec 15, 7:23 pm, David Pollak wrote: > On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett > wrote: > > > > > > > My tables created by Schemefier have multiple keys for the primary key > > when my Map

[Lift] Funny behavior of head merging with nested head blocks

2009-12-16 Thread Ross Mellgren
I was diagnosing some incorrect HTML in our application using Lift, and I found a strange behavior of head merging (I assume) when you emit a tag into a tag from the snippet. The code speaks better than I do about this: ... object Dialog extends DispatchSnippet { val standardDialogOpt

Re: [Lift] Funny behavior of head merging with nested head blocks

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 11:55 AM, Ross Mellgren wrote: > I was diagnosing some incorrect HTML in our application using Lift, > and I found a strange behavior of head merging (I assume) when you > emit a tag into a tag from the snippet. The code speaks > better than I do about this: > > ... > ob

Re: [Lift] Re: Duplicate Keys Created by Schemefier

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 11:07 AM, Peter Robinett wrote: > Fair enough, but isn't this still a non-optimal situation with the > MySQL database driver? > What is your proposed change? > > Peter > > On Dec 15, 7:23 pm, David Pollak > wrote: > > On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett >wr

Re: [Lift] Re: lift_successRegisterGC()

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 5:56 AM, Alex Black wrote: > > Are you using any Comet or Ajax or any Lift generated form elements? If > you > > are using any of these (anything where Lift is storing a function on the > > server-side and presenting the function as a GUID on the client side), > then > >

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
cool, thanks for the info. We're not using those features yet, so we'll leave this off for now. On Dec 16, 4:03 pm, David Pollak wrote: > On Wed, Dec 16, 2009 at 5:56 AM, Alex Black wrote: > > > Are you using any Comet or Ajax or any Lift generated form elements?  If > > you > > > are using any

Re: [Lift] Re: lift_successRegisterGC()

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 1:30 PM, Alex Black wrote: > cool, thanks for the info. We're not using those features yet, so > we'll leave this off for now. > If you're not "using those features" what part of Lift are you using? Can you send the raw HTML (via view source in your browser) of a page?

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
Heh. We're only using basic templates/snippets, and url rewriting/ dispatching. We're not using lift forms, ajax, comet, mapper etc. We just wanted a templating engine that worked well with Scala, and Lift seems to do that pretty nicely I'm stubborn - I'm holding to my views that web servers sh

Re: [Lift] Funny behavior of head merging with nested head blocks

2009-12-16 Thread Ross Mellgren
On Dec 16, 2009, at 3:54 PM, David Pollak wrote: > On Wed, Dec 16, 2009 at 11:55 AM, Ross Mellgren > wrote: > I agree I'm doing the wrong thing here -- the tag > rightly should be outside of the head block, or the snippet should not > emit . However, the resulting behavior is funny (certainly

[Lift] Highlighting even/odd rows in a table

2009-12-16 Thread Stevo
Say for a second that in one of my Snippets I have the following binding: def view(xhtml: NodeSeq): NodeSeq = { val entries: NodeSeq = Customer.findAll() match { case Nil => Text("No customers currently defined")

Re: [Lift] Highlighting even/odd rows in a table

2009-12-16 Thread Ross Mellgren
You could use customers.zipWithIndex.flatMap({ case (customer, index) => ... instead of customers.flatMap(customer => to get the index, and then use index % 2 == 0 to see if it's an even row or an odd row. How you get that style into your template is up to you -- using an attribute bind par

Re: [Lift] Highlighting even/odd rows in a table

2009-12-16 Thread Alex Boisvert
Or delegate the work to the browser using jQuery + CSS http://docs.jquery.com/Selectors/odd alex On Wed, Dec 16, 2009 at 4:04 PM, Ross Mellgren wrote: > You could use customers.zipWithIndex.flatMap({ case (customer, index) > => ... instead of customers.flatMap(customer => to get the index,

Re: [Lift] Highlighting even/odd rows in a table

2009-12-16 Thread Ross Mellgren
Oh, speaking of jquery, tablesorter also has a "zebra" plugin that does this, so if you're tablesorter you can use that also. -Ross On Dec 16, 2009, at 9:01 PM, Alex Boisvert wrote: > Or delegate the work to the browser using jQuery + CSS > http://docs.jquery.com/Selectors/odd > > alex >

Re: [Lift] Scala to JavaScript DSL ...

2009-12-16 Thread Naftoli Gugenheim
I'm thinking of an approach to writing a DSL with a much cleaner syntax. I'll try to put something together. - Marius Danciu wrote: All, I just want to see if there is any interest in the approach discussed here. As you know Lift has some interesting support

[Lift] Re: Latest API Documentation

2009-12-16 Thread Vesa
I would also appreciate aggregated docs. It would be great to have these at least for the M-releases.. - Vesa On 7 marras, 05:47, aw wrote: > OK, so I can go tohttp://scala-tools.org/mvnsites/liftweb-1.1-7/ > but I am not finding a comprehensive ScalaDoc similar to what is > available here:http:

[Lift] Re: Scala to JavaScript DSL ...

2009-12-16 Thread Marius
Let me know when you have something. Br's, Marius On Dec 17, 8:58 am, Naftoli Gugenheim wrote: > I'm thinking of an approach to writing a DSL with a much cleaner syntax. I'll > try to put something together. > > - > > Marius Danciu wrote: > > All, > > I just