[Lift] Re: lift-json serialization

2009-09-24 Thread Joni Freeman
Tim, Extracted function is now in master. I renamed it as 'decompose' since it decomposes case class into JSON AST. Thanks again, Joni On Sep 21, 6:52 pm, Tim Nelson wrote: > First of all thanks for a great library. I'm finding lift-json quite useful > in my current project. > > I have a use c

[Lift] Re: XML -> JSON converter?

2009-09-24 Thread Joni Freeman
Hi, There is now improved XML support in lift master. See a short section in README: http://github.com/dpp/liftweb/tree/master/lift-json/ and some executable examples: http://github.com/dpp/liftweb/blob/master/lift-json/src/test/scala/net/liftweb/json/XmlExamples.scala Cheers Joni On Sep 2, 9:

[Lift] Re: More flexible CRUDify

2009-09-24 Thread Jeppe Nejsum Madsen
Marcin Mielżyński writes: > I'm playing around with CRUDify and to some extent it is flexible. > However, requirements for more flexibility made me extend the CRUDify, > but finally I ended up having all the impl on my own. I think I'm in the same boat :-) The only part I've really looked int

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Jeppe Nejsum Madsen
Indrajit Raychaudhuri writes: > Moved over to main Lift list. Folks, for better handle on the context, > please have a quick run through of the original message before coming to > David's comments and my responses. > > Thanks, Indrajit Looks like a bunch of work, but I really like the propose

[Lift] Add SHtml.button

2009-09-24 Thread Timothy Perrett
Guys, IE8 brings with it a whole new lot of joy and: Does not act as a submit button. According to the interweb, this will fix it: As I need to exectute the submit function in my lift snippet - how can i get around this with the current implementation? Seems like we need a SHtml.button(, ca

[Lift] Re: Add SHtml.button

2009-09-24 Thread Timothy Perrett
Actually scrap that - any solution to make image submit buttons work in IE and lift would be good :-) Cheers, Tim On Sep 24, 9:19 am, Timothy Perrett wrote: > Guys, > > IE8 brings with it a whole new lot of joy and: > > > > Does not act as a submit button. According to the interweb, this will

[Lift] Re: XML -> JSON converter?

2009-09-24 Thread Timothy Perrett
Nice stuff Joni! Cheers, Tim On 24 Sep 2009, at 08:24, Joni Freeman wrote: > > Hi, > > There is now improved XML support in lift master. See a short section > in README: > http://github.com/dpp/liftweb/tree/master/lift-json/ > > and some executable examples: > http://github.com/dpp/liftweb/blob

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Heiko Seeberger
> One comment re the scala versions: I don't know about maven, but for > other build systems, I don't think this completely solves the problem. > Indrajit was talking about Maven and how to improve the POMs (project description files which amongst many other information contain versioned dependenc

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread David Bernard
Hi, removing scala from the direct dependency of project using lift will ease maintenance for user, I agree. But, IMHO : * It's not a good practice because it's like saying that you don't use scala-library directly, it's a transitive/indirect dependency. * project should list every direct depende

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Kevin Wright
On Thu, Sep 24, 2009 at 11:44 AM, David Bernard wrote: > > Hi, > > removing scala from the direct dependency of project using lift will > ease maintenance for user, I agree. > But, IMHO : > * It's not a good practice because it's like saying that you don't use > scala-library directly, it's a tran

[Lift] automaticly generated forms and submit button naming

2009-09-24 Thread Martin
Hi all, I've got a following problem. When I create a form form automaticly.. similar to the User login/register example I encontered a problem I'm not posible to cope with. Firstly I have 'written' a function (using Copy&Paste method) which creates a form fields list based on my class propertie

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Jeppe Nejsum Madsen
Heiko Seeberger writes: >> One comment re the scala versions: I don't know about maven, but for >> other build systems, I don't think this completely solves the problem. >> > > Indrajit was talking about Maven and how to improve the POMs (project > description files which amongst many other info

[Lift] Re: lift-json serialization

2009-09-24 Thread Tim Nelson
Excellent. Thanks. On Thu, Sep 24, 2009 at 2:21 AM, Joni Freeman wrote: > > Tim, > > Extracted function is now in master. I renamed it as 'decompose' since > it decomposes case class into JSON AST. > > Thanks again, Joni > > On Sep 21, 6:52 pm, Tim Nelson wrote: > > First of all thanks for a gre

[Lift] Re: [Lift committers] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Heiko Seeberger
Jeppe, If you are not using Maven, you certainly have to provide any information your build system needs. But why would you want to bother about the POMs then? They are Maven-specific and of no interest for other build systems. Or am I missing something? Heiko On Thursday, September 24, 2009, J

[Lift] Lift job

2009-09-24 Thread Oliver Lambert
Hi all, The company I work for, Paycorp, is based in Sydney Australia and has a job with a significant Lift / Scala component. The job description is posted on http://www.scalacareers.com/ cheers Oliver --~--~-~--~~~---~--~~ You received this message because you ar

[Lift] Re: You are not banned from this group!!

2009-09-24 Thread Oliver Lambert
My son was born a week ago, with a heart defect that has just been operated on - I've been biting my nails for months and haven't felt like communicating or working. Things are starting to look good for him so maybe Im back. cheers Oliver On Thu, Sep 24, 2009 at 12:08 PM, Charles F. Munat wrote:

[Lift] Re: You are not banned from this group!!

2009-09-24 Thread Viktor Klang
On Thu, Sep 24, 2009 at 3:29 PM, Oliver Lambert wrote: > My son was born a week ago, with a heart defect that has just been operated > on - I've been biting my nails for months and haven't felt like > communicating or working. Things are starting to look good for him so maybe > Im back. I'll cr

[Lift] Re: [Lift committers] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Jeppe Nejsum Madsen
Heiko Seeberger writes: > Jeppe, > > If you are not using Maven, you certainly have to provide any > information your build system needs. But why would you want to bother > about the POMs then? They are Maven-specific and of no interest for > other build systems. Or am I missing something? Many

[Lift] Re: automaticly generated forms and submit button naming

2009-09-24 Thread Ross Mellgren
It sounds like you probably want { SHtml.submit("Title of submit button", () => actionToTakeWhenButtonIsUsedToSubmitForm) } By the way, what you have there doesn't seem to be following the usual lift pattern of binding snippets, is there a reason that you prefer this to: template: P

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread David Pollak
As long as the changes you're proposing do not require changes to non-maven projects, I say "go for it." Thanks for taking the time to answer the community's questions and for having such a well thought out proposal! On Wed, Sep 23, 2009 at 10:05 PM, Indrajit Raychaudhuri wrote: > > > Moved ove

[Lift] Re: You are not banned from this group!!

2009-09-24 Thread David Pollak
On Thu, Sep 24, 2009 at 6:29 AM, Oliver Lambert wrote: > My son was born a week ago, with a heart defect that has just been operated > on - I've been biting my nails for months and haven't felt like > communicating or working. Things are starting to look good for him so maybe > Im back. I'll se

[Lift] Re: XML -> JSON converter?

2009-09-24 Thread David Pollak
On Thu, Sep 24, 2009 at 2:04 AM, Timothy Perrett wrote: > > Nice stuff Joni! > +1 > > Cheers, Tim > > On 24 Sep 2009, at 08:24, Joni Freeman wrote: > > > > > Hi, > > > > There is now improved XML support in lift master. See a short section > > in README: > > http://github.com/dpp/liftweb/tree/m

[Lift] [SOLVED] Image submit buttons

2009-09-24 Thread Timothy Perrett
It appears that placing a hidden field at the end of the form with the right function binding solves the issue. Its far from ideal, but ironically appears to be what Microsoft do with .NET to work around IE issues. The joys of IE! Cheers, Tim On Sep 24, 9:41 am, Timothy Perrett wrote: > Actual

[Lift] Re: The LiftView trait can't work ?

2009-09-24 Thread David Pollak
On Wed, Sep 23, 2009 at 7:29 PM, Neil.Lv wrote: > > It works now that i add /test/hello into the SiteMap. > >Menu(Loc("Test", List("test", "hello"), "Test")) > > > But i have something questions about the SiteMap. > If i have more and more these links in my application whether i must > add th

[Lift] Re: Concurrent Web Service Requests?

2009-09-24 Thread David Pollak
On Wed, Sep 23, 2009 at 11:43 AM, Naftoli Gugenheim wrote: > > What do you mean by "as a normal snippet"? The parallel snippet processing is implemented deep inside LiftSession. It's not a snippet. All the tags, even those with defaults built into Lift, are implemented as snippets and are invo

[Lift] Re: Concurrent Web Service Requests?

2009-09-24 Thread Ross Mellgren
My 2 cents, I'm not sure I'm a fan of do: namespace, though I agree it would be nice to have a common one. Maybe snippet:parallel, snippet:eager_eval? -Ross On Sep 24, 2009, at 12:46 PM, David Pollak wrote: > > > On Wed, Sep 23, 2009 at 11:43 AM, Naftoli Gugenheim > wrote: > > What do you me

[Lift] Re: [Lift committers] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Heiko Seeberger
Jeppe, > Many other build systems (Ivy, Gradle, SBT, buildr) etc. can use a Maven > repository to resolve dependencies and hence use the POMs from the repo. > Ah, now I see your point ;-) > I'm not using maven so don't know how the POM in the repo gets > generated, but somehow thought the propo

[Lift] Re: [Lift committers] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Timothy Perrett
This refactoring *must* be done in a branch... we don't want to inadvertently break a whole bunch of peoples projects. From the responses here its obvious there is a fair amount of hesitation around this proposal - thus, lets put it up in a branch and test it to death before even consideri

[Lift] Re: Concurrent Web Service Requests?

2009-09-24 Thread Naftoli Gugenheim
If you like the idea of having them all as attributes but don't like the idea of using a single attribute ('xx:eager_eval="true" xx:parallel="true"' rather than 'xx:eval="eager parallel"' as I suggested, where xx is the prefix to be chosen) then maybe the prefix should be 'eval'. As far as "aj

[Lift] Re: [Lift committers] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread David Pollak
On Thu, Sep 24, 2009 at 11:30 AM, Timothy Perrett wrote: > > This refactoring *must* be done in a branch... we don't want to > inadvertently break a whole bunch of peoples projects. > > Actually, this should not break any existing Lift projects. It should "just work" with existing stuff. > Fro

[Lift] Re: Concurrent Web Service Requests?

2009-09-24 Thread Kevin Wright
Can I recommend "eval" as a prefix...That then gives us eval:eager="true" and eval:parallel="true" On Thu, Sep 24, 2009 at 7:33 PM, Naftoli Gugenheim wrote: > > If you like the idea of having them all as attributes but don't like the > idea of using a single attribute ('xx:eager_eval="true" xx:pa

[Lift] Re: You are not banned from this group!!

2009-09-24 Thread Charles F. Munat
Let's hope that things are fine from here on out! Chas. David Pollak wrote: > > > On Thu, Sep 24, 2009 at 6:29 AM, Oliver Lambert > wrote: > > My son was born a week ago, with a heart defect that has just been > operated on - I've been biting my nails for

[Lift] Re: [SOLVED] Image submit buttons

2009-09-24 Thread Viktor Klang
Cheesus mate, the horrors of war... On Thu, Sep 24, 2009 at 6:23 PM, Timothy Perrett wrote: > > It appears that placing a hidden field at the end of the form with the > right function binding solves the issue. > Its far from ideal, but ironically appears to be what Microsoft do > with .NET to wo

[Lift] Re: You are not banned from this group!!

2009-09-24 Thread Meredith Gregory
Dear Oliver, As a father of five, i know the feeling. Sending good will and good wishes to you and yours, --greg On Thu, Sep 24, 2009 at 6:29 AM, Oliver Lambert wrote: > My son was born a week ago, with a heart defect that has just been operated > on - I've been biting my nails for months and

[Lift] Struggling with mapping a list of objects

2009-09-24 Thread ben
Hi, So I have an object which gets persisted via the normal way .. ie : class Person extends LongKeyedMapper[Person] with IdPK { object name extends MappedPoliteString(this, 128) { } } But I cannot for the life of me work out of to store a list of objects - I can't find any "Map

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Naftoli Gugenheim
How do you want the database to store it? - ben wrote: Hi, So I have an object which gets persisted via the normal way .. ie : class Person extends LongKeyedMapper[Person] with IdPK { object name extends MappedPoliteString(this, 128) { } }

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread harryh
> But I cannot for the life of me work out of to store a list of objects What do you expect the underlying type in the database table to be? Normally this would be done with a separate table with a foreign key (MappedLongForeignKey) back to the users table. -harryh --~--~-~--~~--

[Lift] Re: [Lift committers] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Indrajit Raychaudhuri
On 24/09/09 2:59 PM, Heiko Seeberger wrote: > > One comment re the scala versions: I don't know about maven, but for > other build systems, I don't think this completely solves the problem. > > > Indrajit was talking about Maven and how to improve the POMs (project > description files wh

[Lift] Re: [SOLVED] Image submit buttons

2009-09-24 Thread Indrajit Raychaudhuri
One more trick learned at the cost of somebody's joy! Thanks Tim. On 24/09/09 9:53 PM, Timothy Perrett wrote: > > It appears that placing a hidden field at the end of the form with the > right function binding solves the issue. > Its far from ideal, but ironically appears to be what Microsoft do

[Lift] Re: XML -> JSON converter?

2009-09-24 Thread harryh
This is really really great. Will totally help me out a lot. Thanks! -harryh On Sep 24, 3:24 am, Joni Freeman wrote: > Hi, > > There is now improved XML support in lift master. See a short section > in README:http://github.com/dpp/liftweb/tree/master/lift-json/ > > and some executable > exam

[Lift] Re: [Lift committers] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-24 Thread Indrajit Raychaudhuri
On Sep 24, 11:45 pm, David Pollak wrote: > On Thu, Sep 24, 2009 at 11:30 AM, Timothy Perrett > wrote: > > > > > This refactoring *must* be done in a branch... we don't want to > > inadvertently break a whole bunch of peoples projects. > > Actually, this should not break any existing Lift projec

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread ben
If I was in Java/Hibernate mode, I guess I'd tag it as one-to-many and have a "Skill" object, which maps back to the "Person" object via a key ... just not sure how to do that with Lift's OR mapper. I keep having mental blocks when it comes to lift & scala :( I guess if I was doing it in Java,

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Thomas Rampelberg
I'd suggest a one to many relationship with a foreign key. For something off the top of my head (no guarantees this'll actually work): class Person extends LongKeyedMapper[Person] with IdPK { def getSingleton = Person object skills extends MappedOneToMany(Skills, Skills.person) with Owned[Sk

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread ben
Thanks for the reply, will have a go at that. Cheers, Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, se

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Jeppe Nejsum Madsen
ben writes: > If I was in Java/Hibernate mode, I guess I'd tag it as one-to-many and > have a "Skill" object, which maps back to the "Person" object via a > key ... just not sure how to do that with Lift's OR mapper. I keep > having mental blocks when it comes to lift & scala :( > > I guess if

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Jeppe Nejsum Madsen
harryh writes: >> But I cannot for the life of me work out of to store a list of objects > > What do you expect the underlying type in the database table to be? > Normally this would be done with a separate table with a foreign key > (MappedLongForeignKey) back to the users table. I think what

[Lift] redirectTo throwing net.liftweb.http.ResponseShortcutException: Shortcut

2009-09-24 Thread David
Hello lifters, I have the following form and bind: SHtml.ajaxForm( bind("ajax", xhtml, "view" -> doView _, "save" -> SHtml.ajaxButton( "Save", {() => Log.info("Got a 'save' AJAX call") this.redirectTo("/redirect

[Lift] Re: XML -> JSON converter?

2009-09-24 Thread Indrajit Raychaudhuri
On 24/09/09 2:34 PM, Timothy Perrett wrote: > > Nice stuff Joni! Indeed. That this module gets lots of love shows. Everything nice and tidy in a neat little package. Did I mention that it's test cases serve as docs too? /Indrajit > > Cheers, Tim > > On 24 Sep 2009, at 08:24, Joni Freeman wrot

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread ben
Jeppe : Yes, thats what I was after. It seems like a lot of work to map a list of objects (compared to other ORMs), but I'm willing to give it a go. Shame really, as I've got used to writing less code lately with Scala ! Problem is, LongMappedForeignMapper seems to be only from Lift 1.1 ... but I

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Thomas Rampelberg
You can do this with Mapper using a ManyToMany relationship. To make sure we're talking about the same thing, let me try and explain. With ManyToMany, you can do both Person.find(By(Person.name, name)).map(_.skills) as well as Skills.find(By(Skill.description, description)).map(_.people) and get

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Naftoli Gugenheim
That is exactly what I designed OneToMany / MappedOneToMany for -- to be a view on a one-to-many relationship as a collection. I'm sure it could be optimized better but it works (at least for me :) ). If the wiki article isn't clear enough let me know. MappedOneTwoMany does not extend MappedFie

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread Jeppe Nejsum Madsen
ben writes: > Jeppe : Yes, thats what I was after. It seems like a lot of work to > map a list of objects (compared to other ORMs), but I'm willing to > give it a go. > Shame really, as I've got used to writing less code lately with > Scala ! > > Problem is, LongMappedForeignMapper seems to be o

[Lift] Mapping a read only db view with mapper.

2009-09-24 Thread andythedestroyer
This may be obvious but I am having trouble setting this up. I need to map a database view which isn't a problem because I just set it up as I would any other table. Can I specify in the code that the class and object mapping the view is read only and cannot be modified? It doesn't seem like I c

[Lift] Re: Mapping a read only db view with mapper.

2009-09-24 Thread Thomas Rampelberg
You can .. override def writePermission_? = false (On a per-field basis) On Thu, Sep 24, 2009 at 2:52 PM, andythedestroyer wrote: > > This may be obvious but I am having trouble setting this up. > > I need to map a database view which isn't a problem because I just set > it up as I would a

[Lift] Using Mapper to model entity hierarchies

2009-09-24 Thread glenn
In the interest of sharing ideas with the larger Lift community, I found myself creating many different mapper classes to model a hierarchy of entities best viewed in a tree, such as roles, tags and navigation links. To reduce code duplication, and to try to better understand Mapper classes, I wen

[Lift] Re: Mapping a read only db view with mapper.

2009-09-24 Thread David Pollak
There's no read-only support for tables in mapper at this time. Sorry. On Thu, Sep 24, 2009 at 2:52 PM, andythedestroyer < andythedestro...@gmail.com> wrote: > > This may be obvious but I am having trouble setting this up. > > I need to map a database view which isn't a problem because I just se

[Lift] Re: redirectTo throwing net.liftweb.http.ResponseShortcutException: Shortcut

2009-09-24 Thread David Pollak
Please use the JsCommands.RedirectTo(...) method. This will send a JavaScript command to the browser that will cause it to redirect. the S.redirectTo method is only for redirecting as part of a full page render. On Thu, Sep 24, 2009 at 1:49 PM, David wrote: > > Hello lifters, > I have the foll

[Lift] Re: Mapping a read only db view with mapper.

2009-09-24 Thread Thomas Rampelberg
David, just to make sure that I know what I'm talking about, if you set writePermission_? to false for each field, you could emulate the behavior? On Thu, Sep 24, 2009 at 4:41 PM, David Pollak wrote: > There's no read-only support for tables in mapper at this time.  Sorry. > > On Thu, Sep 24, 2

[Lift] Re: Mapping a read only db view with mapper.

2009-09-24 Thread David Pollak
On Thu, Sep 24, 2009 at 4:46 PM, Thomas Rampelberg wrote: > > David, just to make sure that I know what I'm talking about, if you > set writePermission_? to false for each field, you could emulate the > behavior? > I don't think so, because you can still delete a record. > > > On Thu, Sep 24, 2

[Lift] Re: Mapping a read only db view with mapper.

2009-09-24 Thread Thomas Rampelberg
Ahhha, I guess I've not been trying to actually delete any fields. Thanks! On Thu, Sep 24, 2009 at 4:48 PM, David Pollak wrote: > > > On Thu, Sep 24, 2009 at 4:46 PM, Thomas Rampelberg > wrote: >> >> David, just to make sure that I know what I'm talking about, if you >> set writePermission_? to

[Lift] Re: Canceling a ActorPing.scheduleAtFixedRate task

2009-09-24 Thread David Pollak
I strongly recommend against using scheduleAtFixedRate because: - Internally, it creates an actor that's linked to your actor and that leads one of the Scala Actor memory problems - The turning off issue that you've identified - On the Scala-Actor-free branch of Lift, I've removed the

[Lift] Re: How can I replace SHtml.a with a Loc

2009-09-24 Thread David Pollak
val myLoc: Loc[_] = ... bind("item", xhtml, "addNew" -> Hello) On Wed, Sep 23, 2009 at 11:25 AM, glenn wrote: > > I have a snippet that creates a Ajax link. > > bind("item", xhtml, >"addNew" -> {SHtml.a({ ()=> > SetHtml("item-save", edit(item))}, >

[Lift] Re: Mapping a read only db view with mapper.

2009-09-24 Thread andythedestroyer
Thanks for the replies. I created a trait that overrides writePermission_? called ReadOnly that I mix into each field and I overrided ( overrid? whats the past tense of override? huh.. ) the db_can_delete method in the object to always return false. I am not sure if this will be a good solution b

[Lift] Re: SHtml.a not active when used via innerHtml

2009-09-24 Thread David Pollak
There is a trait in JsCommands: trait HtmlFixer { def fixHtml(uid: String, content: NodeSeq): String = AltXML.toXML(Group(S.session.map(s => s.fixHtml(s.processSurroundAndInclude("JS SetHTML id: "+uid, content))).openOr(content)), false, true, S.ieMode).encJs } What this trait

[Lift] Re: The LiftView trait can't work ?

2009-09-24 Thread Neil.Lv
> Yes. You may choose to use sitemap or not use it. > > If you choose not to use it, comment out the > LiftRules.setSiteMap(SiteMap(MenuInfo.menu :_*)) line Yeah, thank you for your suggestion that it's very useful. Cheers, Neil --~--~-~--~~~---~--~~ You recei