[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 freeman.j...@gmail.comwrote: 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

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 goo...@j.jimmc.org wrote: It looks like the source jars are missing from the M8 repository, at least for some of the libraries (for example, http://scala-tools.org/repo-releases/net/liftweb/lift-util/1.1-M8/). Are

[Lift] lift_successRegisterGC()

2009-12-16 Thread Alex Black
I see the following javascript on each of my pages in my site: // ![CDATA[ jQuery(document).ready(function() {lift_successRegisterGC();}); var lift_page = 'F1212351415633FZT'; // ]] I don't think its necessary for what I'm doing, is there a way to turn off this feature? Thanks! - Alex -- You

Re: [Lift] lift_successRegisterGC()

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 5:47 AM, Alex Black a...@alexblack.ca wrote: I see the following javascript on each of my pages in my site: // ![CDATA[ jQuery(document).ready(function() {lift_successRegisterGC();}); var lift_page = 'F1212351415633FZT'; // ]] I don't think its necessary for what

[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 or

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 :: Nil, _,

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:

[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

[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 feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009 at 5:47 AM, Alex Black a...@alexblack.ca wrote: I see the following javascript on each of my pages in my site: // ![CDATA[

[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 da...@davebsoft.com wrote: For a lightning talk at Bay Area Scala

[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 a...@alexblack.ca wrote: Hi David, is there a way to turn off the output of this javascript code? On Dec 16, 8:51 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009

[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 feeder.of.the.be...@gmail.com wrote: On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett pe...@bubblefoundry.comwrote: My tables created by Schemefier have

[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 head tag into a head tag from the snippet. The code speaks better than I do about this: ... object Dialog extends DispatchSnippet { val

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 dri...@gmail.com 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 head tag into a head tag from the snippet. The code speaks better than I do

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 pe...@bubblefoundry.comwrote: 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 feeder.of.the.be...@gmail.com wrote: On Tue,

Re: [Lift] Re: lift_successRegisterGC()

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 5:56 AM, Alex Black a...@alexblack.ca 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),

[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 feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009 at 5:56 AM, Alex Black a...@alexblack.ca wrote: Are you using any Comet or Ajax or any Lift generated form

Re: [Lift] Re: lift_successRegisterGC()

2009-12-16 Thread David Pollak
On Wed, Dec 16, 2009 at 1:30 PM, Alex Black a...@alexblack.ca 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)

[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

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 dri...@gmail.com wrote: I agree I'm doing the wrong thing here -- the lift:Dialog.head / tag rightly should be outside of the head block, or the snippet should not emit head. However, the

[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

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 dri...@gmail.com wrote: You could use customers.zipWithIndex.flatMap({ case (customer, index) = ... instead of customers.flatMap(customer = to

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 On

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 Danciumarius.dan...@gmail.com wrote: All, I just want to see if there is any interest in the approach discussed here. As you know Lift has

[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 anth...@whitford.com 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

[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 naftoli...@gmail.com wrote: I'm thinking of an approach to writing a DSL with a much cleaner syntax. I'll try to put something together. - Marius