[Lift] Re: JSONParse.parse and List[Any]

2009-10-03 Thread Peter Robinett
Thanks, Tim. I was assuming that it was included as a dependency of lift-core but as I think about I can see why not! Peter On Oct 2, 7:24 pm, Tim Nelson tnell...@gmail.com wrote: Add this below the lift-core dependency: dependency    groupIdnet.liftweb/groupId      

[Lift] lift-json's extract and Mapper

2009-10-03 Thread Peter Robinett
I guess this is basically a question for Joni, but I figure I'll throw it out here for everyone to see. Would it be possible to have extract() support Mapper instances in additional to standard case classes? After parsing some JSON I get the following JValue: JObject(List(JField

[Lift] Re: lift-json's extract and Mapper

2009-10-03 Thread Kevin Wright
Sounds to me like you want to create yourself a small helper function that can map that structure into your own case class, something like: case class TempReading(node:String, dt:Int, temp:Double) It should be possible to do this as a layer on top of the json parser. So you can go from:

[Lift] Re: lift-json's extract and Mapper

2009-10-03 Thread Kevin Wright
Totally untested, but something like this might work for you: case class TempReading(node:String, dt:Int, temp:Double) object JsonTempReading { def unapply(obj: JObject) : Option[TempReading] { obj match { case JObject(List( JField(node, JString(node)), JField(dt,

[Lift] Re: a question about host based url rewriting

2009-10-03 Thread Jeppe Nejsum Madsen
harryh har...@gmail.com writes: Are they essentially two independent apps in terms of templates and snippets? Yes. Though they share the same model (+ some random extra library code). That seems like you just want a virtual host via nginx or some other web server. I could go that

[Lift] Re: lift-json's extract and Mapper

2009-10-03 Thread Peter Robinett
Thanks, Kevin. I'm going to poke around with lift-json a bit more but a case class may be the way to go. As for the datetime, it's actually stored as a Long representing a millisecond Unix timestamp. I've considered scala-time but haven't seen the need to switch yet. Peter On Oct 3, 11:13 am,

[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-03 Thread rintcius
Hmm, I am still confused... Maybe better to get into a specific use case. Suppose i have the following: 1) a lift application just serving stuff via the Servlet interface 2) an object in the ServletContext (let's say spring's ApplicationContext) 3) a snippet that does not need a session but

[Lift] MappedStringForeignKey and Schemifier

2009-10-03 Thread Peter Robinett
I have a model, Node, with a string index. I have another model, Packet, which has a MappedStringForeignKey to Node. Unfortunately, Schemifier doesn't seem to respect the MappedStringForeignKey type and creates a BIGINT column in the packets table, as you can see from its output: INFO - CREATE

[Lift] Re: lift-json's extract and Mapper

2009-10-03 Thread Kevin Wright
On Sat, Oct 3, 2009 at 10:43 AM, Peter Robinett pe...@bubblefoundry.com wrote: Thanks, Kevin. I'm going to poke around with lift-json a bit more but a case class may be the way to go. case classes definitely get you some juicy extras, it becomes a lot easier to filter or map a list of

[Lift] Re: lift-json's extract and Mapper

2009-10-03 Thread Peter Robinett
On Oct 3, 12:04 pm, Kevin Wright kev.lee.wri...@googlemail.com wrote: On Sat, Oct 3, 2009 at 10:43 AM, Peter Robinett pe...@bubblefoundry.com wrote: Thanks, Kevin. I'm going to poke around with lift-json a bit more but a case class may be the way to go. case classes definitely get you

[Lift] Re: a question about host based url rewriting

2009-10-03 Thread Timothy Perrett
Jeppe, you are exactly right. Doing that should work no problem. Cheers, Tim Sent from my iPhone On 3 Oct 2009, at 10:33, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: harryh har...@gmail.com writes: Are they essentially two independent apps in terms of templates and snippets? Yes.

[Lift] Re: lift-json's extract and Mapper

2009-10-03 Thread Kevin Wright
On Sat, Oct 3, 2009 at 11:33 AM, Peter Robinett pe...@bubblefoundry.com wrote: On Oct 3, 12:04 pm, Kevin Wright kev.lee.wri...@googlemail.com wrote: On Sat, Oct 3, 2009 at 10:43 AM, Peter Robinett pe...@bubblefoundry.com wrote: Thanks, Kevin. I'm going to poke around with lift-json a

[Lift] Re: Lift compiled against 2.7.7.RC1

2009-10-03 Thread Indrajit Raychaudhuri
Folks, Lift snapshot artifacts built on Scala 2.7.7.RC1 are now available in scala-tools repository. The artifacts follow the version pattern 1.1-scala2.7.7.RC1-SNAPSHOT. So they are all available in the usual snapshot repository location (http://scala-tools.org/repo-snapshots) as

[Lift] Re: RFC: Restructuring Lift Codebase [Round 2]

2009-10-03 Thread Indrajit Raychaudhuri
On 02/10/09 6:25 PM, David Pollak wrote: On Fri, Oct 2, 2009 at 5:53 AM, Indrajit Raychaudhuri indraj...@gmail.com mailto:indraj...@gmail.com wrote: On Oct 2, 5:39 pm, David Pollak feeder.of.the.be...@gmail.com mailto:feeder.of.the.be...@gmail.com wrote: On Fri, Oct 2,

[Lift] Re: Extending Session Expiry

2009-10-03 Thread Timothy Perrett
OK, so first testing says that session-config session-timeout10/session-timeout /session-config does the trick - for some strange reason winstone appears to cut sessions really short Cheers, Tim On 3 Oct 2009, at 01:30, Timothy Perrett wrote: This explains why I'm not seeing the issue

[Lift] Re: MappedStringForeignKey and Schemifier

2009-10-03 Thread Thomas Rampelberg
I had some issues getting string foreign keys working that required changes to MetaMapper (because of how it handles autogenerated primary keys). That said, Here's some code that'll fix the issue you're currently having: class StringForeignKey[T:Mapper[T],O:KeyedMapper[String, O]]( override

[Lift] Re: RFC: Restructuring Lift Codebase [Round 2]

2009-10-03 Thread marius d.
Why not lift-core = (lift-common, lift-util, lift-json, lift- actor,lift-webkit) ? Br's, Marius On Oct 3, 7:33 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote: On 02/10/09 6:25 PM, David Pollak wrote: On Fri, Oct 2, 2009 at 5:53 AM, Indrajit Raychaudhuri indraj...@gmail.com

[Lift] Re: RFC: Restructuring Lift Codebase [Round 2]

2009-10-03 Thread Indrajit Raychaudhuri
On 04/10/09 12:32 AM, marius d. wrote: Why not lift-core = (lift-common, lift-util, lift-json, lift- actor,lift-webkit) ? 1. Initially, it didn't sound right to me (when we had lift-base, lift-util etc.). 2. DavidP commented, that lift-core currently means everything Lift. and he

[Lift] 1.1-SNAPSHOT and Snippet problems?

2009-10-03 Thread Thomas Rampelberg
I just synced up to main this morning and now whenever I try and use one of my snippets, I'm getting the traceback below. Any hints on what I'm doing wrong? The snippet in question is just the basic Util.in/Util.out that the tutorial has you write. div class=column span-17 last

[Lift] Trouble getting lift up and running

2009-10-03 Thread Mobbit
Would be great to get some help setting up lift, guess I am kind of lost here. I use Mac OS X Snow Leopard with 64bit Java 6. When I try to create a new lift project as written in the tutorial I get the following error message: Invalid task 'archetypeArtifactId=lift-archetype-blank': you must

[Lift] Re: 1.1-SNAPSHOT and Snippet problems?

2009-10-03 Thread marius d.
What verions of lift are you using? It appears that lift-util is a different version than lift ? Br's, Marius On Oct 3, 11:11 pm, Thomas Rampelberg pyronic...@gmail.com wrote: I just synced up to main this morning and now whenever I try and use one of my snippets, I'm getting the traceback

[Lift] Re: RFC: Restructuring Lift Codebase [Round 2]

2009-10-03 Thread marius d.
Ok ... got it. Thanks. On Oct 3, 10:16 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote: On 04/10/09 12:32 AM, marius d. wrote: Why not lift-core = (lift-common, lift-util, lift-json, lift- actor,lift-webkit) ? 1. Initially, it didn't sound right to me (when we had lift-base,

[Lift] Re: 1.1-SNAPSHOT and Snippet problems?

2009-10-03 Thread Thomas Rampelberg
I thought that I'd just updated all the versions . from that stack trace, how do you tell which version lift-util is? On Sat, Oct 3, 2009 at 1:39 PM, marius d. marius.dan...@gmail.com wrote: What verions of lift are you using? It appears that lift-util is a different version than lift ?

[Lift] Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?

2009-10-03 Thread Alex Black
I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes.

[Lift] Re: CometActor timeout problem

2009-10-03 Thread jack
Yes, I will send you this. In the mean time, could you at least tell me how to reset the code. I.E. I would like that everytime you refresh the page, it starts again. On Oct 3, 12:47 am, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com wrote: Hi, On Sat, Oct 3, 2009 at 1:05 PM, jack