[Lift] Is this correct way to handle RESTful like URL in Lift Framework?

2010-01-09 Thread Brian Hsu
If I have a URL like http://localhost/Test/edit/{id} and I would like the {id} transform to a parameter instead of URL path part. The problem is that if I have a template named edit.html under webapp/ Test, which is the template I use to edit an item. And I have a Menu instance like the following

[Lift] Can lift strip all the leading and trailing blank characters?

2010-01-09 Thread daiwhea
I saw the html source generated by the lift both in dev and production mode, there are many leading and trailing blank characters and new lines. Is it possible to make lift strip all these blank characters? Thanks. ->_<- -- You received this message because you are subscribed to the Google Groups

Re: [Lift] Re: Lift Actors on Google App Engine

2010-01-09 Thread Naftoli Gugenheim
Hi qingshan. Sorry I didn't respond earlier. I actually forgot that a current project of mine started a while back geared to GAE, using JPA. I ended up using Mapper and a Rackspace Cloud Server, but I have some code. I could send it to you one of these days but it's actually on an old thread her

[Lift] Need jquery jgGrid working example

2010-01-09 Thread knobi
Hello lifters, I try to get run the example shown at http://trirand.com/blog/jqgrid/jqgrid.html# -> "loading XML data". It shows me the Table-header and the pager but it doesn't call the url:requestfordata?x=xyz. So I see no data in the grid. ... ...

Re: [Lift] Re: Lift Actors on Google App Engine

2010-01-09 Thread Arthur Peters
I will probably be using JDO. And there is no code yet anyway. I thought there was a JPA demo on git hub somewhere. But I guess that would not provide the GAE code you want. Good luck -Arthur (sent from phone) On Jan 9, 2010 4:15 PM, "qingshan" wrote: Hi, What persistence are you using, JPA o

Re: [Lift] Mapper: Hook into owner lifecycle from field

2010-01-09 Thread Naftoli Gugenheim
How would this be implemented in terms of database table structure? - Jeppe Nejsum Madsen wrote: On Thu, Jan 7, 2010 at 6:34 PM, David Pollak wrote: > Can you post some example code of your current thinking as a GitHub project > and we can work on refining it

[Lift] Re: *** Breaking change *** issue 265 Providing more flexible behaviour for NotFound (404)

2010-01-09 Thread Timothy Perrett
Very nice stuff Marius, kudos. Cheers, Tim On Jan 9, 9:52 pm, Marius wrote: > Hi all, > > This affects LiftRules.uriNotFound. It was changed from > >  type URINotFoundPF = PartialFunction[(Req, Box[Failure]), > LiftResponse] > > to > >  type URINotFoundPF = PartialFunction[(Req, Box[Failure]), N

[Lift] *** Breaking change *** issue 265 Providing more flexible behaviour for NotFound (404)

2010-01-09 Thread Marius
Hi all, This affects LiftRules.uriNotFound. It was changed from type URINotFoundPF = PartialFunction[(Req, Box[Failure]), LiftResponse] to type URINotFoundPF = PartialFunction[(Req, Box[Failure]), NotFound] Where NotFound is a trait having 4 refinements: // Default behavior where Lift is re

[Lift] Re: Lift Actors on Google App Engine

2010-01-09 Thread qingshan
Hi, What persistence are you using, JPA or JDO? I was looking for an example of Lift + JPA on GAE but haven't found one. If you have a working demo, would you mind sharing it? Thanks, Qingshan On Jan 8, 3:18 pm, Arthur wrote: > This may have been discussed before but I couldn't find it, so her

Re: [Lift] Re: Lift Modules 1.1-M8 broken "mvn site"

2010-01-09 Thread David Pollak
On Sat, Jan 9, 2010 at 12:39 PM, Jaroslaw Zabiello wrote: > er, the title should be: Lift Widgets - broken "mvn site" > There is a known issue with the openjdk and the YUI compressor library. If it's possible for you to try the Sun JDK, I think things should work. > > -- > You received this me

[Lift] Lift WebKit 1.1-M8 - broken mvn site

2010-01-09 Thread Jaroslaw Zabiello
$ uname -a Linux Ubuntu-904-jaunty-64-minimal 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64 GNU/Linux $ mvn -v Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_0 Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_US, platform encoding: UTF

[Lift] Re: Lift Modules 1.1-M8 broken "mvn site"

2010-01-09 Thread Jaroslaw Zabiello
er, the title should be: Lift Widgets - broken "mvn site" -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com.

[Lift] Proposal to change the AutoComplete widget a tiny bit (with code)

2010-01-09 Thread Mads Hartmann
Hello, While playing around with the AutoComplete widget i wanted to change some of the values passed to the jQuery autocomplete plugin and couldn't figure out if this was possible or not. It didn't seem so when i looked into the AutoComplete.scala file so i added a few lines of code to the AutoCom

[Lift] Lift Modules 1.1-M8 broken "mvn site"

2010-01-09 Thread Jaroslaw Zabiello
$ uname -a Linux Ubuntu-904-jaunty-64-minimal 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64 GNU/Linux $ mvn -v Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_0 Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_US, platform encoding: UTF

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread Heiko Seeberger
2010/1/9 Indrajit Raychaudhuri How about taking the same strategy as last time (during scala 2.7.5 to > 2.7.7)? > Use Maven version classifier fot 2.8.0 build and create separate > hudson job(s) for the purpose. > Yep, let's do that! Heiko My job: weiglewilczek.com My blog: heikoseeberger.name

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread Indrajit Raychaudhuri
Sure. Would do that. On 10/01/10 1:05 AM, David Pollak wrote: Sounds reasonable. Can you work on it after we get 2.0M1 out the door? On Sat, Jan 9, 2010 at 10:59 AM, Indrajit Raychaudhuri mailto:indraj...@gmail.com>> wrote: On Sun, Jan 10, 2010 at 12:01 AM, David Pollak mailto:feeder.

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread David Pollak
Sounds reasonable. Can you work on it after we get 2.0M1 out the door? On Sat, Jan 9, 2010 at 10:59 AM, Indrajit Raychaudhuri wrote: > On Sun, Jan 10, 2010 at 12:01 AM, David Pollak > wrote: > > > > > > On Sat, Jan 9, 2010 at 10:18 AM, Heiko Seeberger > > wrote: > >> > >> 2010/1/9 David Pollak

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread Indrajit Raychaudhuri
On Sun, Jan 10, 2010 at 12:01 AM, David Pollak wrote: > > > On Sat, Jan 9, 2010 at 10:18 AM, Heiko Seeberger > wrote: >> >> 2010/1/9 David Pollak >>> >>> Yeah... now that 2.8 Beta1 is out, we'll need to finish porting Lift >>> over. >> >> Once 2.8 Beta 1 is out: IMHO we are at Beta1 RC7 and it w

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread David Pollak
On Sat, Jan 9, 2010 at 10:18 AM, Heiko Seeberger < heiko.seeber...@googlemail.com> wrote: > 2010/1/9 David Pollak > > >> Yeah... now that 2.8 Beta1 is out, we'll need to finish porting Lift over. >> > > *Once* 2.8 Beta 1 is out: IMHO we are at Beta1 RC7 and it will take > another couple of days u

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread Heiko Seeberger
2010/1/9 David Pollak > > Yeah... now that 2.8 Beta1 is out, we'll need to finish porting Lift over. > *Once* 2.8 Beta 1 is out: IMHO we are at Beta1 RC7 and it will take another couple of days until we will see Beta1. Anyway, I'd be glad to help porting the rest. Heiko My job: weiglewilczek.c

[Lift] Minor *** breaking change *** LiftRules.httpAuthProtectedResource

2010-01-09 Thread Marius
Hi, LiftRules.httpAuthProtectedResource was changed from PartialFunction[ParsePath, Box[Role] to PartialFunction[Req, Box[Role] Also the HttpAuthProtected LocParam from HttpAuthProtected(role: () => Box[Role]) to HttpAuthProtected(role: (Req) => Box[Role]) Br's, Marius -- You received

Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder

2010-01-09 Thread David Pollak
On Sat, Jan 9, 2010 at 6:31 AM, Alex Boisvert wrote: > This change has now been pushed to master. > > LiftRules.finder() has been removed since it offered (unsafe) duplicate > functionality. > Excellent! Thanks! > > cheers, > alex > > > On Mon, Jan 4, 2010 at 4:03 PM, Alex Boisvert wrote: > >>

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread David Pollak
On Sat, Jan 9, 2010 at 5:57 AM, Heiko Seeberger < heiko.seeber...@googlemail.com> wrote: > David, > > 2010/1/8 David Pollak > > Did you smoke test the lift-examples/example app? >> > > Now I did ;-) Looks good. > > The reason I did not before is, that some modules and a lot of tests are > comment

Re: [Lift] Re: Performance related question

2010-01-09 Thread David Pollak
On Sat, Jan 9, 2010 at 9:08 AM, greekscala wrote: > Like, makes it sense to cache a fragment xml when building a list so I > dont have to call findAnyTemplate all the time? > Keep in mind that in production mode, Lift caches templates so findAnyTemplate is a hash table lookup as long as your

[Lift] Re: Performance related question

2010-01-09 Thread Marius
You could do that too ... but the way I see it it would be more a functional decision rather then a performance best practice. In some cases you could consider instead of programmatic findAnyTemplate. It really depends on your design, preferences of doing things etc. Br's, Marius On Jan 9, 7:08 

[Lift] Re: Performance related question

2010-01-09 Thread greekscala
Like, makes it sense to cache a fragment xml when building a list so I dont have to call findAnyTemplate all the time? On 9 Jan., 17:31, greekscala wrote: > Hello Marius, > > yes it is more intended for caching. Ok so I can remove this vals from > my code. > Any other simple performance rules

[Lift] Re: Performance related question

2010-01-09 Thread greekscala
Hello Marius, yes it is more intended for caching. Ok so I can remove this vals from my code. Any other simple performance rules that one should be aware of for Lift? witth best regards On 9 Jan., 16:38, Marius wrote: > Are you using vals mainly for the purpose of caching ? > > I think it is ok

[Lift] Re: Performance related question

2010-01-09 Thread Marius
Are you using vals mainly for the purpose of caching ? I think it is ok to call findAnyTemplates (without using vals) as templates are cached (in production mode) Br's, Marius On Jan 9, 5:29 pm, greekscala wrote: > Hello everyone, > > I am surprised about the few code I have written and the eff

[Lift] Performance related question

2010-01-09 Thread greekscala
Hello everyone, I am surprised about the few code I have written and the effect I get :) I would like to know if this workflow can be optimized: I my snippet method I "findAnyTemplate()" my xml fragments and assigning them to vals. Then I have little functions that bind content with the above x

[Lift] Re: Ajax button + submitting a form

2010-01-09 Thread greekscala
Hello, I have a similar use case. For an AjaxForm you have to write: SHtml.ajaxForm( bind("mytags", xml, // binding to your tags ... "submit" -> SHtml.submit("do it", save), ) ++ SHtml.hidden(save) ) You dont need to have a form element in your templates for this

Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder

2010-01-09 Thread Alex Boisvert
This change has now been pushed to master. LiftRules.finder() has been removed since it offered (unsafe) duplicate functionality. cheers, alex On Mon, Jan 4, 2010 at 4:03 PM, Alex Boisvert wrote: > Instead of: > > > LiftRules.getResourceAsStream(name: String): Box[InputStream] > > I'd suggest:

Re: [Lift] 280_port builds against Scala 2.8 Beta1 RC7

2010-01-09 Thread Heiko Seeberger
David, 2010/1/8 David Pollak Did you smoke test the lift-examples/example app? > Now I did ;-) Looks good. The reason I did not before is, that some modules and a lot of tests are commented out. So was lift-widgets which is a dependency of lift-examples/example. Now I fixed lift-widgets (there

[Lift] Re: Difference between rendered Shtml.a() on first Comet render and partial update?

2010-01-09 Thread elsten software
On Jan 8, 7:11 pm, David Pollak wrote: > [...] > Things will work correctly. They sure did! Thanks everyone, Dan -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this gr

[Lift] Ajax button + submitting a form

2010-01-09 Thread Adam Warski
Hello, I have a regular form, which is submitted with a POST (no AJAX here yet). The form contains a list, to which you can add and remove elements using AJAX. So the add and remove buttons are: "add" -> ajaxButton("Add element", () => { elements += new Element; reDraw }) The "reDraw" method i

[Lift] Re: Can't find JS in /classpath/

2010-01-09 Thread Timothy Perrett
Right - as a wider note, all the widgets follow this init in boot pattern. Cheers, Tim On Jan 9, 9:15 am, Mads Hartmann wrote: > Wohoo, I solved this one myself, success! ;) > > You have to add AutoComplete.init() somewhere in your boot.scala file > > On Jan 9, 10:05 am, Mads Hartmann wrote: >

[Lift] Re: Lift AuthRoles, httpAuthProtectedResource

2010-01-09 Thread Timothy Perrett
David, Thanks for considering me - right now, the breakage is so small and only affects one, small app in production that is soon going to be swallowed by something else i've just written so its a non-issue for me right now. Go for it :-) Cheers, Tim On Jan 8, 8:58 pm, David Pollak wrote: > On

[Lift] Re: Can't find JS in /classpath/

2010-01-09 Thread Mads Hartmann
Wohoo, I solved this one myself, success! ;) You have to add AutoComplete.init() somewhere in your boot.scala file On Jan 9, 10:05 am, Mads Hartmann wrote: > Hello everyone > I'm having a problem with one of the javascript files that lift > includes in the header with the path /classpath/... I'm

[Lift] Re: problems with file upload inside modal

2010-01-09 Thread stephanos
Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem: http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak wrote: > Stephanos, > > It would be ideal if you could put up a quick project on Git

[Lift] Can't find JS in /classpath/

2010-01-09 Thread Mads Hartmann
Hello everyone I'm having a problem with one of the javascript files that lift includes in the header with the path /classpath/... I'm using the autocomplete widget and it's outputing all the right code, but it can't find js file: It can find the jquery.js file located at /classpath/ though. --

[Lift] Re: Lift AuthRoles, httpAuthProtectedResource

2010-01-09 Thread Marius
Ok, the changes are on review board. Br's, Marius On Jan 8, 11:36 pm, Marius wrote: > On Jan 8, 10:58 pm, David Pollak > wrote: > > > On Fri, Jan 8, 2010 at 12:55 PM, Marius wrote: > > > I definitely agree for httpAuthProctectedResource to take a Req > > > instead of a ParsePath even this is a

[Lift] Re: what provides classpath/jquery.js?

2010-01-09 Thread Marius
It is given by LiftRules.resourceServerPath. Resources places in /src/ resources/toserve fodler are not served by container, but they are served by Lift. There is a ResourceServer class that manages that. if you put your own resources here you need to call ResourceServer.allow (in your boot) and gr

[Lift] what provides classpath/jquery.js?

2010-01-09 Thread harmanjd
I am working through the StartingWithLift document and saw that the page includes /classpath/jquery.js. Is that something that jetty supplies, or is that supplied by the lift framework? I didn't see that path mapped in the Boot class or anything. Thanks, James -- You received this message beca