[Lift] Re: Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Marius
Ross you're most welcomed. On Nov 20, 2:38 am, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I'm pleased to announce that Ross Mellgren has joined the Lift committers. He's been a very helpful voice on the list for a while now and he's decided to help out with code as well... woo

[Lift] Re: intro to lift-json?

2009-11-20 Thread Joni Freeman
Hi, There's several ways to get values from JSON. 1. Use LINQ style query comprehension: for { JField(bar, JInt(x)) - json } yield x 2. Extract values with case classes implicit val formats = net.liftweb.json.DefaultFormats case class Foo(foo: Bar) case class Bar(bar: Int) json.extract[Foo]

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Timothy Perrett
Welcome. What specificaly will you be working on? What are your goals? Where are you based? Cheers, Tim Sent from my iPhone On 20 Nov 2009, at 05:21, Indrajit Raychaudhuri indraj...@gmail.com wrote: Welcome Ross! Would look forward to more of those well thought out responses. Cheers,

Re: [Lift] Re: Pages getting redirected back to root, /ajax_request/?? and ActorPingException

2009-11-20 Thread Timothy Perrett
That would be: LiftRules.redirectAjaxOnSessionLoss = false Cheers, Tim On 20 Nov 2009, at 00:54, David Pollak wrote: If you don't like the feature, you can turn it off in LiftRules (I don't remember the property off hand, but I'm sure someone else can help me.) -- You received this

Re: [Lift] Re: intro to lift-json?

2009-11-20 Thread Jonas Bonér
I like that. But still hate JSON ;-) 2009/11/20 Joni Freeman freeman.j...@gmail.com: Hi, There's several ways to get values from JSON. 1. Use LINQ style query comprehension: for { JField(bar, JInt(x)) - json } yield x 2. Extract values with case classes implicit val formats =

Re: [Lift] Re: Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-20 Thread Timothy Perrett
Ah yes, that's the one. Engine yard put up some money for someone to build it and if memory serves it was done by some Russian dude. I forget, but I've been using this fair load balencer in production for about 2 years. It's solid. Cheers, Tim Sent from my iPhone On 20 Nov 2009, at 12:07,

Re: [Lift] Another List XYZ Menu Entry

2009-11-20 Thread Hannes
I meant, that I had general problems to find a way how to do it, not talking about the Lift way to do it. So I think I need a new XHTML page where I call a snippet method, that displays the table. Then, from the menu item, I just link to that new page? Would that be the right way? thanks.

Re: [Lift] JPA and eager fetch

2009-11-20 Thread Jim Barrows
Model isn't doing much other then setting up the manager to work, so I don't think that's the issue. I don't have time to look at it this morning, but if no one has an answer for you, I'll try to help this evening. On Thu, Nov 19, 2009 at 5:40 PM, wstrange warren.stra...@gmail.com wrote:

Re: [Lift] Another List XYZ Menu Entry

2009-11-20 Thread Jim Barrows
On Fri, Nov 20, 2009 at 6:26 AM, Hannes hannes.flo...@gmx.li wrote: I meant, that I had general problems to find a way how to do it, not talking about the Lift way to do it. So I think I need a new XHTML page where I call a snippet method, that displays the table. Then, from the menu item,

Re: [Lift] Another List XYZ Menu Entry

2009-11-20 Thread Hannes
Maybe you could give a one liner, showing how to write the menu item in Boot.scala. thanks. On Fri, Nov 20, 2009 at 6:26 AM, Hannes hannes.flo...@gmx.li mailto:hannes.flo...@gmx.li wrote: I meant, that I had general problems to find a way how to do it, not talking about the Lift

Re: [Lift] Another List XYZ Menu Entry

2009-11-20 Thread Jim Barrows
On Fri, Nov 20, 2009 at 7:07 AM, Hannes hannes.flo...@gmx.li wrote: Maybe you could give a one liner, showing how to write the menu item in Boot.scala. A menu entry looks something like: Menu( Loc(helpHome, (help :: ::Nil) - true, Help)) The list ( help :: :: Nil) is the path to the the

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Ross Mellgren
At least initially just bug fixes and cleanup as I can find it, but since the company I'm working for is starting to use Lift, more will probably come up. I'm open to suggestions, if anyone has something niggling that they don't have the time for. I live in Cambridge, MA, and work in

Re: [Lift] Another List XYZ Menu Entry

2009-11-20 Thread Hannes
I read some stuff of chapter five before, but this was the extra hint, that I needed... thanks! On Fri, Nov 20, 2009 at 7:07 AM, Hannes hannes.flo...@gmx.li mailto:hannes.flo...@gmx.li wrote: Maybe you could give a one liner, showing how to write the menu item in Boot.scala. A

[Lift] Re: Pages getting redirected back to root, /ajax_request/?? and ActorPingException

2009-11-20 Thread Alex Black
Thanks Tim. Do you happen to know any way of also removing this line from my webpages: script type=text/javascript src=/ajax_request/liftAjax.js - Alex On Nov 20, 5:25 am, Timothy Perrett timo...@getintheloop.eu wrote: That would be: LiftRules.redirectAjaxOnSessionLoss = false Cheers, Tim

Re: [Lift] Re: Pages getting redirected back to root, /ajax_request/?? and ActorPingException

2009-11-20 Thread Ross Mellgren
I believe LiftRules.autoIncludeAjax controls this -- its value is a function that determines on a per-session basis whether the AJAX script should be included, for example to disable it site-wide: LiftRules.autoIncludeAjax = session = false -Ross On Nov 20, 2009, at 10:43 AM, Alex Black

[Lift] Re: Pages getting redirected back to root, /ajax_request/?? and ActorPingException

2009-11-20 Thread Alex Black
Thanks, that works great. On Nov 20, 10:51 am, Ross Mellgren dri...@gmail.com wrote: I believe LiftRules.autoIncludeAjax controls this -- its value is a   function that determines on a per-session basis whether the AJAX   script should be included, for example to disable it site-wide:

[Lift] Sharing data between snippet functions during a single HTTP request

2009-11-20 Thread Alex Black
I've got a template page, say foobar.html, that makes a number of calls to functions in a snippet, e.g. mysnippet.foo1, mysnippet.foo2, mysnippet.foo3. I'd like to do some initial work in foo1, e.g. retrieve some data and do some work on it, then in foo2 and foo3 display parts of that data.

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 7:14 AM, Ross Mellgren dri...@gmail.com wrote: At least initially just bug fixes and cleanup as I can find it, but since the company I'm working for is starting to use Lift, more will probably come up. I'm open to suggestions, if anyone has something niggling that they

[Lift] Re: Sharing data between snippet functions during a single HTTP request

2009-11-20 Thread Alex Black
Thanks Ross, that helps a lot. As a Lift newbie, I'm curious, would it be possible (in a future version of list) to re-use snippet instances for all calls during an HTTP request? Then people could share data between snippet methods (within a single snippet) by just writing regular member

Re: [Lift] Re: Sharing data between snippet functions during a single HTTP request

2009-11-20 Thread Ross Mellgren
You can use a StatefulSnippet for that, and just never use the persistence mechanisms, like this: class MySnippet extends StatefulSnippet { var myLocalVariable: Int = 0 val dispatch: DispatchIt = { case firstPart = renderFirstPart case secondPart = renderSecondPart

Re: [Lift] Re: Sharing data between snippet functions during a single HTTP request

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 8:17 AM, Alex Black a...@alexblack.ca wrote: Thanks Ross, that helps a lot. As a Lift newbie, I'm curious, would it be possible (in a future version of list) to re-use snippet instances for all calls during an HTTP request? Then people could share data between snippet

[Lift] Re: Sharing data between snippet functions during a single HTTP request

2009-11-20 Thread Alex Black
On Nov 20, 11:30 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 20, 2009 at 8:17 AM, Alex Black a...@alexblack.ca wrote: We made this change for Lift 1.1.  So, if you're using 1.1, the same instance of a snippet should be used for a given HTTP request. Very cool. I'm

Re: [Lift] Re: Sharing data between snippet functions during a single HTTP request

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 8:33 AM, Alex Black a...@alexblack.ca wrote: On Nov 20, 11:30 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 20, 2009 at 8:17 AM, Alex Black a...@alexblack.ca wrote: We made this change for Lift 1.1. So, if you're using 1.1, the same instance of

Re: [Lift] Lift 1.1-M7 and Terracotta

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 1:56 AM, Timothy Perrett timo...@getintheloop.euwrote: This is really funny this should crop up - I've been having a conversation at Devoxx about cluster / distributing Lift. David, one of the things i've been thinking is that it would be cool if we could potentially

Re: [Lift] Re: Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-20 Thread David Pollak
2009/11/19 monty chen montyc...@qq.com Hi,David Pollk! Nginx only comes with a round-robin balancer and a hash-based balancer, so if a request takes a while to load, Nginx will start routing requests to backends that are already processing requests -- as a result, some backends will be

[Lift] Re: Call it Lift 2.0

2009-11-20 Thread Joni Freeman
Hi, I will look into adding Box support. Cheers Joni On 19 marras, 21:24, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 17, 2009 at 10:06 PM, Joni Freeman freeman.j...@gmail.comwrote: On 18 marras, 01:10, David Pollak feeder.of.the.be...@gmail.com wrote: I'd like to see

Re: [Lift] Another List XYZ Menu Entry

2009-11-20 Thread Jim Barrows
On Fri, Nov 20, 2009 at 8:18 AM, Hannes hannes.flo...@gmx.li wrote: I read some stuff of chapter five before, but this was the extra hint, that I needed... A lot of Scala and, by extension, Lift requires some deep contemplation of what it means. a path implemented as a List makes little

[Lift] Re: A sensible AJAX approach

2009-11-20 Thread glenn
I've been following this thread as lately I'm having difficulty with an ajax-submitted request in my app. Here's the scenario (There's no simple way to describe this, so bear with me): I create a JQuery tree of my data (Mapper object with just an item name and a parent Mapper object as it's

Re: [Lift] Re: A sensible AJAX approach

2009-11-20 Thread David Pollak
Glenn, All functions are bound to the current state in the scope that the function was created. There's no need to do weird RequestVar things with Hidden fields or anything else. If you've got a function passed to SHtml.text, submit, etc. that function closes over its local scope: it captures

[Lift] Re: A sensible AJAX approach

2009-11-20 Thread glenn
David, That's what I thought. All I needed to do was create the Mapper.toForm like so: item.toForm(Full(Save), { _.save }) and the item would be saved on submit. But it doesn't work in my case. Glenn On Nov 20, 10:05 am, David Pollak feeder.of.the.be...@gmail.com wrote: Glenn, All

Re: [Lift] Re: A sensible AJAX approach

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 10:14 AM, glenn gl...@exmbly.com wrote: David, That's what I thought. All I needed to do was create the Mapper.toForm like so: item.toForm(Full(Save), { _.save }) and the item would be saved on submit. But it doesn't work in my case. Please put together a

[Lift] Memcached + Mapper (or Record?)

2009-11-20 Thread harryh
Is anyone successfully running Lift with a simple Memcached based row cache? If so, are you doing it with Mapper or Record? Are there any docs and/or sample code that would help with this sort of thing? I'm happy to read source code, but wondering if there are any other resources in this

[Lift] JavaFX

2009-11-20 Thread Randinn
I was wondering if anyone has had any success connecting JavaFX to Lift, I found this http://stronglytypedblog.blogspot.com/2009/10/scala-console-with-javafx-experimental.html but I'm wondering how hard it is to work with lift. -- You received this message because you are subscribed to the

Re: [Lift] JavaFX

2009-11-20 Thread Naftoli Gugenheim
If you mean JavaFX calling into Scala code I tried and it didn't seem to work. JavaFX probably makes assumptions about $ in names. - Randinnrand...@gmail.com wrote: I was wondering if anyone has had any success connecting JavaFX to Lift, I found this

Re: [Lift] Memcached + Mapper (or Record?)

2009-11-20 Thread David Pollak
Personally, I'd use final case classes, serialize them via lift-json and put them in memcached... but that's just me. On Fri, Nov 20, 2009 at 10:30 AM, harryh har...@gmail.com wrote: Is anyone successfully running Lift with a simple Memcached based row cache? If so, are you doing it with

[Lift] Re: JavaFX

2009-11-20 Thread Randinn
Hmm, that's too bad, I remember seeing you say something to that effect in a Sun forum but was hoping it might have been worked-around. On Nov 21, 5:45 am, Naftoli Gugenheim naftoli...@gmail.com wrote: If you mean JavaFX calling into Scala code I tried and it didn't seem to work. JavaFX

[Lift] Re: Memcached + Mapper (or Record?)

2009-11-20 Thread harryh
Then how to go back from the case class (pulled in from memcached) to a Mapper object (that I can modify and then save)? I'm worried about getting the mapper object in an incorrect state where it thinks it needs to add a new row to the table on save rather than update an existing one. Ideally

[Lift] Three years of a Scala lust affair, the blog post

2009-11-20 Thread David Pollak
Folks, I've been doing Scala for three years as of today. I wrote a blog post about it: http://blog.lostlake.org/index.php?/archives/97-Happy-3rd-Anniversay.html There are a lot of people to thank for making Scala the great thing it is today. Martin has led his EPFL team to bridge academia and

Re: [Lift] Re: Memcached + Mapper (or Record?)

2009-11-20 Thread David Pollak
Hmmm... so you want to cache the model object in memcached rather than keeping a link to it in the JVM... when you have a modify operation to the model object, you want to update the field and hit save and have the right row go back to the RDBMS? Is that pretty much the sequence? (sorry if I'm

Re: [Lift] Re: JavaFX

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 10:50 AM, Randinn rand...@gmail.com wrote: Hmm, that's too bad, I remember seeing you say something to that effect in a Sun forum but was hoping it might have been worked-around. Are you talking JavaFX on the client and Lift/Scala on the server? If so, I think you can

Re: [Lift] JPA and eager fetch

2009-11-20 Thread Jean-Luc
Your mapping looks like normal. If you provide a buildable project, either tgz or link to github.com, I may be able to reproduce your problem and help you identify the issue. Jean-Luc PS : If you need a git project to fork, I just prepared http://github.com/jlcanela/scalajpademo (based on the

[Lift] Re: Memcached + Mapper (or Record?)

2009-11-20 Thread harryh
Hmmm... so you want to cache the model object in memcached rather than keeping a link to it in the JVM. Yes, because I'm running on 1 JVMs. when you have a modify operation to the model object, you want to update the field and hit save and have the right row go back to the RDBMS? Yes.

Re: [Lift] Re: Ajax and custom HTTP headers

2009-11-20 Thread Xavi Ramirez
+1 On Fri, Nov 13, 2009 at 6:33 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 13, 2009 at 1:37 PM, Marius marius.dan...@gmail.com wrote: Hi, Do you think it would worth having a better support for setting HTTP headers for Ajax requests ? I mean some REST API's may use

[Lift] Re: [scala] Three years of a Scala lust affair, the blog post

2009-11-20 Thread Jonas Bonér
Thanks a lot for 3 years of leadership and inspiration. Brilliant and humble at the same time. You have taught me a lot and inspired me to dig deeper into Scala and is also a great guy to hang out with. Keep it up. /Jonas 2009/11/20 David Pollak feeder.of.the.be...@gmail.com: Folks, I've been

Re: [Lift] Three years of a Scala lust affair, the blog post

2009-11-20 Thread Chris Lewis
David, Thank you for being so generous with your knowledge and experience, for your tireless efforts on Lift, and for always reaching out to newbies in the scala and lift communities. Several times you've answered my own questions directly, and your unwavering patience speaks volumes to your

Re: [Lift] odd ajax issue (works every other time)

2009-11-20 Thread O'Rorke Paul
thanks, Ross: this fixed the multiple versions of scala warning. ---Paul O On Nov 17, 2009, at 3:09 PM PST, Ross Mellgren wrote: I can't comment on the AJAX issue in particular, though you should switch to Scala 2.7.7 -- that's the version that should be used with 1.1-SNAPSHOT. -Ross On

[Lift] How to use TestRunner

2009-11-20 Thread Xuefeng Wu
Hello, I'm working on lift testkit 1.1-M7 and want to write unit test. I didn't find ReportFailure, TestKit at testing but found TestRunner when use TestFramework. I think it's interesting for mocking DB and web server, but I couldn't find any help. Could anyone explain it and give a demo how

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Timothy Perrett
OK I see, cool. In that case, be sure to adhere to the processes we have in place and discuss any proposed change on the lift list ;-) Cheers, Tim On 20 Nov 2009, at 16:14, Ross Mellgren wrote: At least initially just bug fixes and cleanup as I can find it, but since the company I'm

[Lift] Re: Lift 1.1-M7 and Terracotta

2009-11-20 Thread Timothy Perrett
HAHA - yup, thats exactly what I mean! There was work previously done on distributing with terracotta and it was fraught with problems and exception cases. What are your thoughts right now on serialisation (other than its a nightmare)? Cheers, Tim The only thing that is a little bit of a

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Ross Mellgren
Aw, but it's way more fun to surreptitiously push commits to further my own nefarious agendas. -Ross On Nov 20, 2009, at 6:35 PM, Timothy Perrett wrote: OK I see, cool. In that case, be sure to adhere to the processes we have in place and discuss any proposed change on the lift list ;-)

Re: [Lift] Re: Lift 1.1-M7 and Terracotta

2009-11-20 Thread David Pollak
On Fri, Nov 20, 2009 at 3:39 PM, Timothy Perrett timo...@getintheloop.euwrote: HAHA - yup, thats exactly what I mean! There was work previously done on distributing with terracotta and it was fraught with problems and exception cases. What are your thoughts right now on serialisation (other

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Timothy Perrett
Ha - well I'm afraid you've just come into a crowd that's been heavily weened off that style ;-) In all seriousness the process is key to our on-going sucsess and I feel very strongly that our discussion, code, review cycles are the only way to produce quality code and keep the balence of

Re: [Lift] Welcome Ross Mellgren to the Lift Committers

2009-11-20 Thread Ross Mellgren
Oh of course, I've noticed the review board coming into effect and when I asked DPP about policies or guidelines he mentioned it then also. I'll be good :-) -Ross On Nov 20, 2009, at 7:08 PM, Timothy Perrett wrote: Ha - well I'm afraid you've just come into a crowd that's been heavily

[Lift] Re: Menu generated from database?

2009-11-20 Thread philip
Hi David, Really looking forward to this - I spent a day on this with absolute failure. Philip On 11月20日, 上午1時56分, David Pollak feeder.of.the.be...@gmail.com wrote: Philip list, I've had it on my to-do list to write up an example... and haven't... but... In your Loc, you can override def

Re: [Lift] Re: Menu generated from database?

2009-11-20 Thread Ross Mellgren
Here's an example of doing what David decribed (at least, as I understood it ;-) ): // In Boot.scala // Build SiteMap val entries = ... :: Menu(DynMenuLoc(Dynamic Menu, Link(List(dynamic), true, /dynamic), Dynamic Menu)) :: ... case class DynMenuLoc (

[Lift] Re: Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-20 Thread monty chen
David Pollk, thanks you reply! Let us talk about tomcat or jetty Which web container is recommended to use to deploy the Lift app. I remember your reply of Derek Chen-Becker: On 5月5日, 上午5时59分, David Pollak feeder.of.the.be...@gmail.com wrote: Derek, Please note that about half of the

[Lift] Re: Call it Lift 2.0

2009-11-20 Thread Heiko Seeberger
Folks, I would like to bring this version discussion to an end. I would prefer 2.0 but, I am also cool with 1.1. If there are still unheard arguments for 2.0, please speak out now. For me it is important that there is a version policy in place, such that everyone knows what's the difference