[Lift] Re: Help on Build from source

2009-07-29 Thread nile black
Hi,Everyone i try to fix the problem eg: [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.scala:16: error: value util is not a member of package net.java [WARNING] import java.util.concurrent.locks._ i use import _root_.java.util.concurrent.locks._ instead of

[Lift] Re: Help on Build from source

2009-07-29 Thread nile black
Nile Black On Wed, Jul 29, 2009 at 2:31 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Jul 28, 2009 at 11:05 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: If it thinks import java.xxx is a relative import of net.java.xxx, then it must be you're somehow building it

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Heiko Seeberger
Hi all, This is a very good discussion! As I am trying to provide OSGi support for Lift, I already encountered this booting/resolving issue. If we could go for OSGi-only this would be a straightforward task (like Stephen described), but we have to support both worlds: Static monolithic non-OSGi

[Lift] Re: Schemifier for Record?

2009-07-29 Thread Giuseppe Fogliazza
In my comprehension of the overall framework, Mapper provides persistence together with form management for ui construction and some serialization method to support the development of REST services. In the design of Record, persistency has been stripped away in order to create the condition to

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Arthur
Hi all I'm completely new to Lift (and Scala) so I'm not yet very familiar with the Lift-specific needs regarding modularization. But I just come from an OSGi project and would like to share two experiences I've had: * Usually OSGi handles classloading very well. Where you can run into problems

[Lift] Re: Schemifier for Record?

2009-07-29 Thread marius d.
On Jul 29, 10:44 am, Giuseppe Fogliazza g.foglia...@mcmspa.it wrote: In my comprehension of the overall framework, Mapper provides persistence together with form management for ui construction and some serialization method to support the development of  REST services. In the design of

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread Timothy Perrett
Hey David, Have you manage to submit any more brain cycles to this? Cheers, Tim I have some serious thoughts on this.  I've been swamped with client-based stupid over-work over the last 10 days.  I have one last set of stuff to do tomorrow and I'll be back on list on Tuesday afternoon.

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Heiko Seeberger
Arthur, Thanx for sharing your experiences! Please find my comments below ... Heiko 2009/7/29 Arthur avand...@gmail.com Hi all I'm completely new to Lift (and Scala) so I'm not yet very familiar with the Lift-specific needs regarding modularization. But I just come from an OSGi project

[Lift] Re: Schemifier for Record?

2009-07-29 Thread Giuseppe Fogliazza
Thank you for the interest and the kind offering to adapt the framework. I will post my request. At the moment the major extension that I would require to Record is a neat management of MultiField[T]. I need them in my domain model and they will be persisted as multi valued properties (or

[Lift] How to configure MySQL In Lift

2009-07-29 Thread pravin
Hi, I want to configure MySQL in my lift application. From following site http://scala-tools.org/scaladocs/liftweb/1.0/ i come to know that there is one object called net.liftweb.mapper.MySqlDriver. So how can i use this for MySQL connectivity in my lift application. Thanks -Pravin

[Lift] Re: How to configure MySQL In Lift

2009-07-29 Thread Timothy Perrett
pravin, Please see: http://wiki.liftweb.net/index.php/HowTo_configure_lift_with_MySQL Cheers, Tim On Jul 29, 9:31 am, pravin pravinka...@gmail.com wrote: Hi, I want to configure MySQL in my lift application. From following sitehttp://scala-tools.org/scaladocs/liftweb/1.0/  i come to know

[Lift] Re: scala+maven

2009-07-29 Thread David Bernard
Hi, I don't understand what you try to do and what you mean by Now I need to run project from repository ? Could you provide the use case ? I also copy/move to the mailing-list maven-and-scala. /davidB On Tue, Jul 28, 2009 at 23:16, ph pkirsa...@gmail.com wrote: Maybe better question would

[Lift] Re: scala+maven

2009-07-29 Thread Mark Essel
Actually this is relevant to some problems I was having simply getting a nice sandbox to learn scala/lift with eclipse. Thank to the original poster and the good folks who answered. Bookmarking http://blog.getintheloop.eu/2008/12/19/enabling-launchers-and-warnings-with-scala-maven-plugin for

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Ryan Donahue
-1 for adding modules by dropping in a jar Suppose the jar supplies multiple Lift modules and I only want to use one, or suppose I want to use some other class in the jar and don't want to use any of its Lift modules. Adding a module to a Lift app really should be an explicit action by the

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Timothy Perrett
Ryan, I agree with you for the most part - certainly making it explicit would be my preference also. Im not 100% sure that we would need to replicate all the LiftRules functionality as a trait for plugins, as that's just one aspect of how a plugin could change the environment. Your point about

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Heiko Seeberger
Just a quick and dirty reply: In order to get OSGi support LiftRules should delegate *everything* to a Collection of LiftModules. LiftModules can be added to and removed from this collection anytime. Heiko 2009/7/29 Timothy Perrett timo...@getintheloop.eu Ryan, I agree with you for the

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Ryan Donahue
More spitballing... Tim, I really don't know which LiftRules stuff would need to be included. For other types of environment changes, the trait could have onLoad and onUnload methods. Heiko, Maybe it is possible to make such a change without breaking API, though I am still fairly new to Lift

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Heiko Seeberger
Sounds good! Any ideas how class lookups (snippets at least) could be delegated to various modules. Currently Lift is using the *global* classpath in a fashion that makes it really hard / impossible for OSGi. Heiko 2009/7/29 Ryan Donahue donahu...@gmail.com More spitballing... Tim, I

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 1:21 AM, Timothy Perrett timo...@getintheloop.euwrote: Hey David, Have you manage to submit any more brain cycles to this? No. I will spend some time on it today. Cheers, Tim I have some serious thoughts on this. I've been swamped with client-based

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Timothy Perrett
@Heiko: Im not sure we would need to lookup snippets, as the module creator could just register them with LiftRules right? (think DispatchSnippet etc) @all: I think we need to take a step back here a second: Everyone wants a plugin system, but not everyone wants OSGi (specifically the

[Lift] Re: Help on Build from source

2009-07-29 Thread David Pollak
Nile, Scala imports are relative unless the path of the import is prefixed by _root_. This behavior is the subject of fierce discussion on the Scala list. What does relative mean? It's like this: import net.liftweb._ import http._ // imports net.liftweb.http._ The problem is that if you have

[Lift] Re: scala+maven

2009-07-29 Thread ph
If I have private remote repository, I deploy there a new binaries, then all my servers need to run those binaries. I would need to get them to local repository and run locally. What would be a right workflow for that? On Jul 29, 4:54 am, David Bernard david.bernard...@gmail.com wrote: Hi,

[Lift] Re: scala+maven

2009-07-29 Thread ph
This maybe dumb question, but I new to Java/Maven and cannot find any good resources that would describe whole building, deployment, binaries running workflow... Here I probably need to describe what I'm trying to do (maybe this is completely wrong approach I'm trying to implement). We have

[Lift] Re: scala+maven

2009-07-29 Thread Mark McBride
I distilled at least two questions from this 1) How do I use scala artifacts from a private remote repository (i.e. I don't need to go outside my own network to download artifacts)? 2) How do I define the scala repositories in settings.xml instead of in every pom.xml file? We actually do

[Lift] Re: scala+maven

2009-07-29 Thread David Bernard
A very quick workflow about web dev in the java world : 1. developer create/work on a webapp 2. developer package the webapp into a archive my-webapp.war (who include lift in your case) ('mvn package'), developer give the .war to deployer team + some configuration instruction (eg : how to

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Naftoli Gugenheim
For that price you could write com.mypackage.Init etc. - Timothy Perretttimo...@getintheloop.eu wrote: @Heiko: Im not sure we would need to lookup snippets, as the module creator could just register them with LiftRules right? (think DispatchSnippet etc)

[Lift] Re: scala+maven

2009-07-29 Thread David Bernard
I higlhy suggest you use a solution like nexus (IMO better than artifactory to install/manage). On Wed, Jul 29, 2009 at 17:07, Mark McBride mark.mcbr...@gmail.com wrote: I distilled at least two questions from this 1) How do I use scala artifacts from a private remote repository (i.e. I

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Timothy Perrett
Bah, that's very true Naftoli... On 29/07/2009 16:33, Naftoli Gugenheim naftoli...@gmail.com wrote: For that price you could write com.mypackage.Init etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Ryan Donahue
LiftRules.addToEnviroment(com.mypackage), and the com.mypackage conforms to a known standard / format with some special traits that we call loading methods on. This isn't really any different then building a module by extending LiftModule trait except that the known standard / format' is

[Lift] Re: Modularization of Lift code

2009-07-29 Thread glenn
This discussion has gotten beyond a simple solution for Lift plugins. Most Lift apps now don't use OSGi, and modularization means something different in a non-OSGi environment. For one thing, it's not dynamic. You still have to code to use the new module. A well-mannered Lift/OSGi marriage is a

[Lift] Re: Modularization of Lift code

2009-07-29 Thread Heiko Seeberger
Glenn, We have got OSGi support on the roadmap for 1.1, hence IMHO this has to be addressed right now. Heiko 2009/7/29 glenn gl...@exmbly.com This discussion has gotten beyond a simple solution for Lift plugins. Most Lift apps now don't use OSGi, and modularization means something

[Lift] Where is source code for demo app?

2009-07-29 Thread Goldfish
I see nice features demo'd at both http://lift-example.appspot.com/index and http://demo.liftweb.net/index. Now where can I read the source code behind the site, so I can start implementing some of the same things? --~--~-~--~~~---~--~~ You received this message

[Lift] Re: How to configure MySQL In Lift

2009-07-29 Thread Peter Robinett
Pravin, if you generated your Lift app using archetype lift-archetype- basic, then you can just drop in a property file and the app will use it upon next restart. This has the benefit of not hardcoding any database information in Boot.scala. Here's my props file that I have at

[Lift] Re: Where is source code for demo app?

2009-07-29 Thread David Bernard
for http://demo.liftweb.net/index http://github.com/dpp/liftweb/tree/222d3b02cf4de3c214505035b6fd2471b299d42f/sites On Wed, Jul 29, 2009 at 19:05, Goldfish gregt...@mindspring.com wrote: I see nice features demo'd at both http://lift-example.appspot.com/index and

[Lift] Re: Where is source code for demo app?

2009-07-29 Thread Timothy Perrett
Find the source here: http://to.ly/nEZ On 29/07/2009 18:05, Goldfish gregt...@mindspring.com wrote: I see nice features demo'd at both http://lift-example.appspot.com/index and http://demo.liftweb.net/index. Now where can I read the source code behind the site, so I can start implementing

[Lift] Re: Where is source code for demo app?

2009-07-29 Thread Goldfish
Excellent! I see it now. Sub-menus are within my grasp. :) On Jul 29, 1:25 pm, Timothy Perrett timo...@getintheloop.eu wrote: Find the source here:http://to.ly/nEZ On 29/07/2009 18:05, Goldfish gregt...@mindspring.com wrote: I see nice features demo'd at

[Lift] Re: scala+maven

2009-07-29 Thread ph
Thanks a lot everybody for replies. I think I'm quite clear what I need to do. The reason why I wanted to use Maven in Production environment is to make it easier to deploy new version to private remote repository and upgrade local repositories when new version in private remote repository is

[Lift] Re: Lift runtime stats snippet

2009-07-29 Thread Derek Chen-Becker
You could package it into a site stats panel widget :) On Tue, Jul 28, 2009 at 10:19 PM, DFectuoso santiago1...@gmail.com wrote: Funny thing to display in a website Mixing that with the runmode and displaying a div with that information could be useful for development(im doing this with

[Lift] _root_ of import problems

2009-07-29 Thread David Pollak
Guys, I've updated a bunch of files to insure _root_ on the java package imports. See http://github.com/dpp/liftweb/commit/40c646d5861bfc59df9e5323338d73b4adf31a61 If you were having problems compiling Lift sources, please do a git pull and mvn clean install to verify that the fix did in fact

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread David Pollak
Tim, While at this point, all the CometActor stuff is associated with screen real estate in a browser, that's not a requirement for using CometActors. CometActors can communicate via XHTML, JavaScript or both (yes, we can extend this to support JSON as well). The value that the CometActors bring

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread David Pollak
Peter, Please fork http://github.com/dpp/lift_1_1_sample/tree/master and create an app that's failing in your GitHub repo. Once we have code to work with, we can solve the problem. Thanks, David On Tue, Jul 28, 2009 at 2:09 PM, Peter Robinett pe...@bubblefoundry.comwrote: Sorry to bump

[Lift] Re: How to install non-standard Lift from GitHub

2009-07-29 Thread David Pollak
I'd suggest forking and changing the version from 1.1-SNAPSHOT to 1.1.J-SNAPSHOT You can do an mvn clean install and the 1.1.J-SNAPSHOT will be in your local Maven repository (~/.m2) You can point your projects to 1.0, 1.1-Mx, 1.1-SNAPSHOT, and 1.1.J-SNAPSHOT at will and all of the version will

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread Xavi Ramirez
Hello, I don't quite understand what a more REST orientated approach. Do you mean purely client-side comet actor interface? I personally would love to write javascript like this: lift.comet.MyActor.listeners.add(myListener); lift.comet.MyActor.send(myJSObj); I've been emulating this type of

[Lift] Put in a way I can understand the whole XHTML, XHTML 2, HTML 5 thingy

2009-07-29 Thread David Pollak
http://www.smashingmagazine.com/2009/07/29/misunderstanding-markup-xhtml-2-comic-strip/ -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp

[Lift] Re: Starting with Lift, download source code

2009-07-29 Thread David Pollak
Robin, If you're looking for the finished To Do example code, here it is. Thanks, David On Tue, Jul 21, 2009 at 9:09 PM, robin bakkerus robin.bakke...@gmail.comwrote: Hello Is it possible to download the source code of the project being created in the Starting with Lift (liftworkshop)

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 11:59 AM, Xavi Ramirez xavi@gmail.com wrote: Hello, I don't quite understand what a more REST orientated approach. Do you mean purely client-side comet actor interface? I personally would love to write javascript like this:

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Peter Robinett
Hi Derek, I'm afraid I'm not sure how to do this, since _dirty_? is a private var in MappedField: /** * Is the field dirty */ private var _dirty_? = false /** * Is the field dirty (has it been changed since the record was loaded from the database */ def dirty_? = !dbPrimaryKey_? _dirty_?

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Naftoli Gugenheim
Did you try to override def dirty_? and def dirty_?(b: Boolean), and in the latter set your own private variable and read it in dirty_? (the getter)? - Peter Robinettpe...@bubblefoundry.com wrote: Hi Derek, I'm afraid I'm not sure how to do this, since

[Lift] Re: Stamped Trait question

2009-07-29 Thread David Pollak
On Tue, Jul 28, 2009 at 5:12 PM, fbettag fr...@bett.ag wrote: So far it looks like this: trait Stamped[OwnerType : Stamped[OwnerType] with LongKeyedMapper [OwnerType] with IdPK] { this: OwnerType = private val thisTyped = this.asInstanceOf[MapperType] override def

[Lift] Re: find, set and save

2009-07-29 Thread Hannes
Hi Dave, Thanks for your answer and sorry for the late reply. In the first filter line... do you just want to filter out the LimitOrders that do not have the same tradeType foreign key reference as the FK of the parameter that you pass in? Yes, that's part of the filtering, but I need to do

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread Timothy Perrett
Hey David, I agree with everything your saying - how do you propose we move forward? My concept for a sample application is an email client written in capp... IMO would be a nice ever based sample. Thoughts? Cheers, Tim Sent from my iPhone On 29 Jul 2009, at 19:57, David Pollak

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 1:10 PM, Timothy Perrett timo...@getintheloop.euwrote: Hey David, I agree with everything your saying - how do you propose we move forward? My concept for a sample application is an email client written in capp... IMO would be a nice ever based sample. Let's work

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Peter Robinett
Hi all, My sample code is here: http://github.com/pr1001/lift_1_1_sample/tree/master I hadn't been overriding def dirty_?(b: Boolean) but I see why I need to. With everyone's suggestions, here is how I try to set the MAC address: $ mvn scala:console scala new bootstrap.liftweb.Boot().boot

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Derek Chen-Becker
Right. Something like: private var myDirty = false override def dirty_? = myDirty override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?(b) } I think that that should work. Derek On Wed, Jul 29, 2009 at 1:42 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Did you try to

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
Yes thanks, it gives me an idea of the issue which i now see. Could you provide a very simple example on how you would make the Meta- Mixin? That would be very good best regards On 29 Jul., 21:55, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Jul 28, 2009 at 5:12 PM, fbettag

[Lift] Re: Stamped Trait question

2009-07-29 Thread David Pollak
trait Foo[A : Mapper[A]] { self: MetaMapper[A] = } On Wed, Jul 29, 2009 at 1:38 PM, fbettag fr...@bett.ag wrote: Yes thanks, it gives me an idea of the issue which i now see. Could you provide a very simple example on how you would make the Meta- Mixin? That would be very good best

[Lift] Re: Comet DispatchPF - RestfulCometActor?

2009-07-29 Thread Timothy Perrett
I actually already started work on building a standalone chat application this afternoon with regular comet actors and markup... are you suggesting we then try and reskin that we a capp front end and add lift elements where needed? Cheers, Tim Let's work on the multi-user chat project first.  

[Lift] Asynchronous Javascript problem

2009-07-29 Thread Channing Walton
Hi, I'm working on an app which has a google map which users can use to search for locations, and on which I want to place markers. The asynchronous call is a call to google's geocoder service which takes a string to search for from an input field, and a callback function that the position will

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
Hm. i changed it to this: trait Stamped[OwnerType : Mapper[OwnerType] with IdPK] { self: MetaMapper[OwnerType] = private val thisTyped = this.asInstanceOf[MapperType] override def afterSave: List[Any] = { createActionLog(create, this.getClass.toString,

[Lift] User questions

2009-07-29 Thread Naftoli Gugenheim
Using MegaProtoUser, how do you: 1. Have logging in redirect to the page that redirected to log in? 2. Automatically log in using cookies? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: find, set and save

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 1:09 PM, Hannes hannes.flo...@gmx.li wrote: Hi Dave, Thanks for your answer and sorry for the late reply. In the first filter line... do you just want to filter out the LimitOrders that do not have the same tradeType foreign key reference as the FK of the

[Lift] Re: User validation by admin

2009-07-29 Thread David Pollak
Sounds like a worthy addition. I'd suggest that rather that doing more flags that you create a validation function that people can replace with whatever they want... by default that function looks at the current skipEmailValidation flag. On Tue, Jul 28, 2009 at 1:07 PM, Naftoli Gugenheim

[Lift] Re: Modularization of Lift code

2009-07-29 Thread David Pollak
On Tue, Jul 28, 2009 at 12:10 PM, glenn gl...@exmbly.com wrote: Hi, Ross, So, with the changes, where would templates need to be placed in jar files in order to be found - or can they be put in any directory as long as the resource is noted in ResourceServer? ResourceServer is used

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Peter Robinett
Thanks Derek, but I'm afraid it doesn't. Peter On Jul 29, 1:26 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Right. Something like: private var myDirty = false override def dirty_? = myDirty override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?(b) } I think that that

[Lift] Re: Stamped Trait question

2009-07-29 Thread David Pollak
It's not pretty, but: trait MyLogger[A : KeyedMapper[K, A], K] extends KeyedMetaMapper[K,A] { self: A with MetaMapper[A] with KeyedMapper[K, A] = override def afterSave = doSomething _ :: super.afterSave private def doSomething(in: A) { println(Got +in) } } On Wed, Jul 29, 2009

[Lift] Re: Modularization of Lift code

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 4:31 AM, Ryan Donahue donahu...@gmail.com wrote: -1 for adding modules by dropping in a jar Dropping in JAR files that automatically become part of your app is not going to happen. I've seen too many horror show situations where people have stuff on their classpath

[Lift] Re: User questions

2009-07-29 Thread David Pollak
For the latter, take a look at the ESME code... specifically the ExtSession.scala file On Wed, Jul 29, 2009 at 3:37 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Using MegaProtoUser, how do you: 1. Have logging in redirect to the page that redirected to log in? 2. Automatically log in

[Lift] Re: Lift (AsyncWeb || ...)

2009-07-29 Thread David Pollak
Sounds like a worthy goal. Please test it a lot against real world code so we can tell all the things that break. On Mon, Jul 27, 2009 at 12:32 AM, marius d. marius.dan...@gmail.com wrote: I created wip-marius-http-abstractions branch and commits will follow soon. I started the approach of

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
how would i use that trait? with MyLogger[MyModel, MyModel] ? What is A and what is K supposed to be? On 30 Jul., 00:55, David Pollak feeder.of.the.be...@gmail.com wrote: It's not pretty, but: trait MyLogger[A : KeyedMapper[K, A], K] extends KeyedMetaMapper[K,A] {    self: A  with

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
Btw. the docs for KeyedMapper don't work.. http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/KeyedMapper.html when i click on KeyType or OwnerType it gives me a 404.. On 30 Jul., 00:55, David Pollak feeder.of.the.be...@gmail.com wrote: It's not pretty, but: trait MyLogger[A :

[Lift] Re: Stamped Trait question

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 4:21 PM, fbettag fr...@bett.ag wrote: Btw. the docs for KeyedMapper don't work.. http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/KeyedMapper.html when i click on KeyType or OwnerType it gives me a 404.. This is a limitation of vscaladoc... sorry.

[Lift] Re: Stamped Trait question

2009-07-29 Thread Kevin Wright
On Thursday, July 30, 2009, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jul 29, 2009 at 4:21 PM, fbettag fr...@bett.ag wrote: Btw. the docs for KeyedMapper don't work.. http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/KeyedMapper.html when i click on KeyType

[Lift] Re: Stamped Trait question

2009-07-29 Thread David Pollak
K is the type of the primary key: object MyModel extends MyModel with KeyedMetaMapper[Long, MyModel] with MyLogger[MyModel, Long] On Wed, Jul 29, 2009 at 4:18 PM, fbettag fr...@bett.ag wrote: how would i use that trait? with MyLogger[MyModel, MyModel] ? What is A and what is K supposed to

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Peter Robinett
Thanks, David, I am now able to save the mac address. I am, however, able to create multiple rows in the database with the same mac address, suggesting that that the uniqueness of the primary key is not being enforced. This surprised me, as MappedStringIndex extends MappedUniqueId. Does something

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 4:35 PM, Peter Robinett pe...@bubblefoundry.comwrote: Thanks, David, I am now able to save the mac address. I am, however, able to create multiple rows in the database with the same mac address, suggesting that that the uniqueness of the primary key is not being

[Lift] Re: Parsing JSON POST

2009-07-29 Thread David Pollak
On Fri, Jul 24, 2009 at 8:57 PM, fbettag fr...@bett.ag wrote: Still one problem when parsing: results: {name:New Content,language:en,content:,layout: 22} java.lang.NumberFormatException: For input string: 22.0 at java.lang.NumberFormatException.forInputString

[Lift] Re: Asynchronous Javascript problem

2009-07-29 Thread David Pollak
You can put a little JavaScript on the page which contains a function that you can call... for example: define a JsonHandler: object PointHandler extends JsonHandler { def apply(in: Any): JsCmd = in match { case JsonCmd(setPoint, _, yourData, _) = /// do something with yourData

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
Okay i got this so far, only one tiny thing i can't get to work now: trait Stamped[A : LongKeyedMapper[A]] extends KeyedMetaMapper[Long, A] { self: A with MetaMapper[A] with KeyedMapper[Long, A] = private val thisTyped = this.asInstanceOf[MapperType] override def

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread Peter Robinett
Ahh, here we go: INFO - CREATE TABLE users (id BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY , firstname VARCHAR(32) , lastname VARCHAR(32) , email VARCHAR (48) , locale VARCHAR(16) , timezone VARCHAR(32) , password_pw VARCHAR (48) , password_slt VARCHAR(20) , textarea VARCHAR(2048) , superuser

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
trait Stamped[A : LongKeyedMapper[A] with IdPK] extends KeyedMetaMapper[Long, A] { self: A with MetaMapper[A] with KeyedMapper[Long, A] = override def afterSave = createSaveLog _ :: super.afterSave override def afterUpdate = createUpdateLog _ :: super.afterSave

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
And the final version: trait Stamped[A : LongKeyedMapper[A] with IdPK] extends KeyedMetaMapper[Long, A] { self: A with MetaMapper[A] with KeyedMapper[Long, A] = override def afterSave = (createLog(_: A, create)) :: super.afterSave override def afterUpdate = (createLog(_:

[Lift] Re: Stamped Trait question

2009-07-29 Thread fbettag
Now the last and final question: how would i go about and add this to the trait: object test extends MappedBoolean(this) ? i tried: private val thisTyped = this.asInstanceOf[A] object published extends MappedBoolean(thisTyped) and just this and self. Any ideas? On 30 Jul.,

[Lift] Re: Stamped Trait question

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 5:54 PM, fbettag fr...@bett.ag wrote: Now the last and final question: how would i go about and add this to the trait: object test extends MappedBoolean(this) ? You can't add this to a MetaMapper trait, it must be part of a trait that's mixed into the Mapper. Look

[Lift] Re: Mapper and Primary Keys

2009-07-29 Thread David Pollak
Did you look at all the overridden methods on the Cat primary key in the example? You have to override the method that defines the column in the RDBMS to define the column as UNIQUE NOT NULL. On Wed, Jul 29, 2009 at 5:24 PM, Peter Robinett pe...@bubblefoundry.comwrote: Ahh, here we go: INFO

[Lift] Re: Weekly Article Request

2009-07-29 Thread David Pollak
Mine articles are done. On Wed, Jul 22, 2009 at 8:37 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jul 22, 2009 at 3:22 AM, Xavi Ramirez xavi@gmail.com wrote: Hello, My name is Xavi and I've volunteered as the wiki garden. Every week I'll post a couple of articles

[Lift] Simple Javascript question(from a lift snippet of course...)

2009-07-29 Thread DFectuoso
This is probably trivial but can't seem to find the lifty way... without hand rolling javascript What is the best way to generate(in the snippet) a javascript command to be run on the window.onload event? Thank you very much you divine and infinite source or lift knowledge AKA lift google group

[Lift] Re: Help on Build from source

2009-07-29 Thread nile black
Thanks everyone for your help and replies! It builds successful in my new clean colinux vm. Nile Black On Wed, Jul 29, 2009 at 10:11 PM, Timothy Perrett timo...@getintheloop.euwrote: FYI, David MacIver recently wrote a blog about exactly how package imports work :-)