[Lift] Re: Js normalizations

2010-03-08 Thread Peter Robinett
+! On Mar 7, 11:11 pm, Heiko Seeberger wrote: > On 7 March 2010 19:37, Marius wrote: > > > > > If you think that this makes sense I'll add a ticket and put it in my > > backlog. > > Makes a lot of sense for me. Go for it! > > Heiko > > Company: weiglewilczek.com > Blog: heikoseeberger.name > Fol

Re: [Lift] Lift-M2 One To Many and CRUDify

2010-03-08 Thread Jeppe Nejsum Madsen
ojonam writes: > Hello all, > > I recently tested the wiki example of Book and Authors as an exercise, > and extended them with CRUDify. On generation, however, the "Author" > field in the Book create page says : "Can't Change!", instead of > giving me a select list of all the authors. > > My que

[Lift] Re: BSON support in lift-json

2010-03-08 Thread Joni Freeman
This is a tricky one. The problem with extending the AST is that the AST is implemented as an algebraic data type. And by definition it is not possible to extend such a type. One way to add BSON support is to create a new AST for it which includes all extended literals. Then add a few core functio

Re: [Lift] Re: Javascript Dependencies

2010-03-08 Thread Jeppe Nejsum Madsen
Marius writes: > On Mar 6, 9:14 pm, Peter Robinett wrote: [...] > Hmmm ... anything that is outputting (x)html. We have snippets, comet > actors, LiftView-s. Any of these can called multiple times but IMHO > registration should happen once. For snippets and comet we could a > nested snippet su

[Lift] Re: Javascript Dependencies

2010-03-08 Thread Peter Robinett
Marius, I love the simplicity of your proposal but I think that's also its problem. Let's say I have something with several dependencies: // you got the idea // specific tags As you can see, the user may as well be writing raw XHTML for a head tag: they're required to

[Lift] Re: Lift-M2 One To Many and CRUDify

2010-03-08 Thread ojonam
Hi Jeppe, that works indeed, thanks. Although, in 2.0-M2, technically you need to extend LongMappedMapper (as MappedForeignKey is deprecated). Anyway, here is the little bit of code, if anyone is interested (or interested in changing the wiki page for CRUD) : class Book extends LongKeyedMapper[Bo

[Lift] Re: Javascript Dependencies

2010-03-08 Thread Marius
On Mar 8, 11:02 am, Peter Robinett wrote: > Marius, > > I love the simplicity of your proposal but I think that's also its > problem. Let's say I have something with several dependencies: > >   >     >     >     >    // you got the idea >   >   // specific tags > > > As you can see, the u

[Lift] lift-blog - lift based blogging app

2010-03-08 Thread Lukasz Kuczera
Hi Folks. I've spawned very simple blog app on lift. This is alpha version and code base is not clean (i'm quite new to scala and lift). You can pull it from github: git://github.com/kukems/lift-blog.git And there is even demo ;) http://www.acidbits.org/lift-blog/ I need your assistance in choosin

Re: [Lift] lift-blog - lift based blogging app

2010-03-08 Thread Timothy Perrett
http://www.acidbits.org/lift-blog/ gives a 404 error? Cheers, Tim On 8 Mar 2010, at 12:51, Lukasz Kuczera wrote: > Hi Folks. > I've spawned very simple blog app on lift. This is alpha version and > code base is not clean (i'm quite new to scala and lift). You can pull > it from github: git://g

[Lift] Re: lift-blog - lift based blogging app

2010-03-08 Thread Lukasz Kuczera
It is some issue with name based virtual hosting in apache. If i try to connect using ip address it doesn't work. http://87.204.87.110/lift-blog Fortunately its on internet facing host. Try this one: http://gates.itigo.pl:8080/lift-blog On Mar 8, 2:14 pm, Timothy Perrett wrote: > http://www.acid

Re: [Lift] Re: Lift-M2 One To Many and CRUDify

2010-03-08 Thread Naftoli Gugenheim
You mean MappedLongForeignMapper is deprecated? - ojonam wrote: Hi Jeppe, that works indeed, thanks. Although, in 2.0-M2, technically you need to extend LongMappedMapper (as MappedForeignKey is deprecated). Anyway, here is the little bit of code, if anyone is

[Lift] How to use lazy-load?

2010-03-08 Thread Jeppe Nejsum Madsen
Hi, I have a page with a somewhat lengthy first-time load. So I found lazy-load that looked handy, but it doesn't seem to work. This is my template: Udvikling per måned Vis: Opdel efter: Nothing in the performanceChart s

Re: [Lift] Trouble with lift-couchdb

2010-03-08 Thread Craig Blake
Writing into the database with the new field type works fine, but I'm running into a little hitch trying to access the value. Given the test code (again this is in the Github test project, g...@github.com:craigwblake/lift-couchdb-test.git): object TestEnum extends Enumeration { val One

[Lift] Re: Lift-M2 One To Many and CRUDify

2010-03-08 Thread ojonam
Apologies, yes, that is what I meant (or rather LongMappedForeignMapper) : http://scala-tools.org/mvnsites/liftweb-1.1-M6/lift-mapper/scaladocs/net/liftweb/mapper/LongMappedForeignMapper.html Manohar On Mar 8, 3:01 pm, Naftoli Gugenheim wrote: > You mean MappedLongForeignMapper is deprecated? >

Re: [Lift] Re: Lift-M2 One To Many and CRUDify

2010-03-08 Thread Naftoli Gugenheim
And it is used on the wiki? Would you volunteer to update it then? Thanks. - ojonam wrote: Apologies, yes, that is what I meant (or rather LongMappedForeignMapper) : http://scala-tools.org/mvnsites/liftweb-1.1-M6/lift-mapper/scaladocs/net/liftweb/mapper/LongMa

[Lift] Re: How to use lazy-load?

2010-03-08 Thread Marius
Can you please send me a minimalistic example ? .. The comet actor shutdown looks correct to me as after the lazy content is rendered that comet is not needed anymore. Can you check with firebug if you get any asynchronous javascript back from the comet request? On Mar 8, 4:31 pm, Jeppe Nejsum Ma

Re: [Lift] lift-blog - lift based blogging app

2010-03-08 Thread David Pollak
On Mon, Mar 8, 2010 at 4:51 AM, Lukasz Kuczera wrote: > Hi Folks. > I've spawned very simple blog app on lift. This is alpha version and > code base is not clean (i'm quite new to scala and lift). You can pull > it from github: git://github.com/kukems/lift-blog.git And there is > even demo ;) htt

Re: [Lift] Re: IdPK Model boiler-plate

2010-03-08 Thread David Pollak
I'm going to implement this as a sub-trait of IdPK (anyone got a good name for the trait). So, by default, you'll get the current behavior, but if you think equality should be based on primary key rather than on the field values, you don't have to have all the boilerplate. On Sun, Mar 7, 2010 at

Re: [Lift] Re: IdPK Model boiler-plate

2010-03-08 Thread Jim Barrows
How about: PrimaryKeyEquality which would read something like: "class foo extends IdPk with PrimaryKeyEquality" On Mon, Mar 8, 2010 at 10:25 AM, David Pollak wrote: > I'm going to implement this as a sub-trait of IdPK (anyone got a good name > for the trait). So, by default, you'll get the c

[Lift] Re: lift-blog - lift based blogging app

2010-03-08 Thread TylerWeir
Cool stuff! On Mar 8, 12:20 pm, David Pollak wrote: > On Mon, Mar 8, 2010 at 4:51 AM, Lukasz Kuczera wrote: > > Hi Folks. > > I've spawned very simple blog app on lift. This is alpha version and > > code base is not clean (i'm quite new to scala and lift). You can pull > > it from github: git://

Re: [Lift] Re: Js normalizations

2010-03-08 Thread David Pollak
On Mon, Mar 8, 2010 at 12:36 AM, Peter Robinett wrote: > +! > Does this translate to "I vote you must do this?" ;-) +1 > > On Mar 7, 11:11 pm, Heiko Seeberger > wrote: > > On 7 March 2010 19:37, Marius wrote: > > > > > > > > > If you think that this makes sense I'll add a ticket and put it i

Re: [Lift] Re: BSON support in lift-json

2010-03-08 Thread David Pollak
On Mon, Mar 8, 2010 at 12:50 AM, Joni Freeman wrote: > This is a tricky one. The problem with extending the AST is that the > AST is implemented as an algebraic data type. And by definition it is > not possible to extend such a type. > Just throwing an idea out and it's likely a bad one. I ran i

Re: [Lift] Reorganize mapper specs?

2010-03-08 Thread David Pollak
On Sun, Mar 7, 2010 at 12:47 PM, Naftoli Gugenheim wrote: > Based on discussion on Review Board item 247, I want to propose the > following change to the organization of Mapper specs. > Currently there are four files in > framework/lift-persistence/lift-mapper/src/test/scala/net/liftweb/mapper: >

[Lift] Re: [lift] 2.0-M3 & JQuery 1.4

2010-03-08 Thread Channing Walton
I am interested in this too but I don't understand the thing, where can I find out more? AnthonyW wrote: > > Ugh, I must have had a cache issue despite the fact that I certainly > did hit refresh before... > I am now seeing 1.4.2 JQuery. > > Regarding , I just added that too. This is > defin

Re: [Lift] Re: IdPK Model boiler-plate

2010-03-08 Thread Naftoli Gugenheim
I'm very confused. Where is there currently an implementation of equals that compares all fields? And what's the difference between KeyedMapper checking primaryKeyField and IdPK checking id? - Jim Barrows wrote: How about: PrimaryKeyEquality which would rea

[Lift] Enable -Xcheckinit in 2.8 port?

2010-03-08 Thread Jeppe Nejsum Madsen
Hi, Just found out why the Logging stuff doesn't work on the 2.8 branch. Details here: http://permalink.gmane.org/gmane.comp.lang.scala.user/24469 Is it somehow possible to enable the -Xcheckinit flag for the 2.8 branch? Don't know how common that issue is, but it may help trap some subtle errors

Re: [Lift] Enable -Xcheckinit in 2.8 port?

2010-03-08 Thread David Pollak
On Mon, Mar 8, 2010 at 10:01 AM, Jeppe Nejsum Madsen wrote: > Hi, > > Just found out why the Logging stuff doesn't work on the 2.8 branch. > Details here: http://permalink.gmane.org/gmane.comp.lang.scala.user/24469 > > Is it somehow possible to enable the -Xcheckinit flag for the 2.8 > branch? Don

[Lift] Re: Lift security vulnerability

2010-03-08 Thread Dano
Thanks Joni! I appreciate the sample code. Dan On Mar 7, 8:10 am, Joni Freeman wrote: > Note, it is very easy to clean up the JSON before rendering by using > 'map' function: > > json map { >   case JString(s) => JString(sripOutBinaryChars(s)) >   case x => x > > } > > (You just need to implem

Re: [Lift] Re: BSON support in lift-json

2010-03-08 Thread Ross Mellgren
I personally think hybrid approaches make sense for certain designs even if they are a little odd. My thought originally was having a new member of the ADT which is not final which represents "extensions", e.g. JValue \_ JExtension \_ JDate where JExtensions could be ignored or passed

[Lift] Re: 2.0-M3 & JQuery 1.4

2010-03-08 Thread Marius
The scaladocs of WithResourceId snippet looks like this: /** * Adds a resource id entity for each URI in order to control browser caching. * The rules of creating "unique" URI's are defined in LiftRules.attachResourceId function. * * * * *