[Lift] Re: About the performance

2009-12-21 Thread DMB
substantially faster, despite being pretty much a straight, class-for-class port of Java code. On Dec 14, 10:05 am, Marcin Mielżyński l...@gazeta.pl wrote: On 2009-12-14 02:26, DMB wrote: That's a common misconception among Java folks. Leaving aside the relative merits of the various web frameworks

[Lift] Re: Lift 1.1-M8

2009-12-15 Thread DMB
Hmm. A word of warning - Netbeans 6.8 requires Scala 2.8. I found out the hard way. If anyone knows a workaround on how to make Netbeans 6.8 work with Lift, do share. On Dec 15, 3:16 am, Timothy Perrett timo...@getintheloop.eu wrote: No, it is not in yet. This is currently on the 2_8_0 branch

[Lift] Re: About the performance

2009-12-13 Thread DMB
This makes me wonder how these number compare to other Java frameworks as well as to Mono XSP. It's hard to do an apples to apples comparison with these things, but on the Microsoft side I've seen ASP.NET serve way more pages per second than that (2-3x), on what would now be considered outdated

[Lift] Re: About the performance

2009-12-13 Thread DMB
. Scala. Once the developer tries closures and functional programming on sequences, it's kinda hard to go back to Java. On Dec 13, 3:31 pm, Marcin Mielżyński l...@gazeta.pl wrote: DMB pisze: This makes me wonder how these number compare to other Java frameworks as well as to Mono XSP. It's hard

[Lift] Re: About the performance

2009-12-13 Thread DMB
:21, DMB combust...@gmail.com wrote: This makes me wonder how these number compare to other Java frameworks as well as to Mono XSP. It's hard to do an apples to apples comparison with these things, but on the Microsoft side I've seen ASP.NET serve way more pages per second than that (2-3x

[Lift] Re: Fwd: Watch Foursquare Lift talk live from NY

2009-12-09 Thread DMB
Because you're sick and tired of maintaining other peoples EJB/Struts/whatever You'll be just as sick and tired of maintaining other people's (and your own) Scala code in six to nine months, except you'll be doing it for less money and the code will be in flux all the time. The solution to the

[Lift] Re: Fwd: Watch Foursquare Lift talk live from NY

2009-12-08 Thread DMB
I've been with Foursquare for four months, and during this time I've decided to change their infrastructure to Scala and Lift. LOL. Good luck hiring devs for this, guys. You will need it. On Dec 8, 1:49 pm, Mateo Barraza mateo.barr...@gmail.com wrote: that last link works. THanks  Tyler! M

[Lift] Re: Fwd: Watch Foursquare Lift talk live from NY

2009-12-08 Thread DMB
feeder.of.the.be...@gmail.com wrote: On Tue, Dec 8, 2009 at 7:34 PM, DMB combust...@gmail.com wrote: I've been with Foursquare for four months, and during this time I've decided to change their infrastructure to Scala and Lift. LOL. Good luck hiring devs for this, guys. You will need it. Why do you say

[Lift] How do I go about implementing my own auth?

2009-12-07 Thread DMB
Basically here's what I want to accomplish: 1. I want the user to login through a simple form on /index.html - this is the only unprotected page on the site. User does not have a user name, the only field is a password. 2. I want to store the user role (along with some other state data) in the

[Lift] Re: How do I go about implementing my own auth?

2009-12-07 Thread DMB
I'm using neither Mapper (JPA is used instead) nor SiteMap. Thanks for the explanation, I'll try this today. On Dec 7, 6:14 am, Marius marius.dan...@gmail.com wrote: On Dec 7, 1:09 pm, DMB combust...@gmail.com wrote: Basically here's what I want to accomplish: 1. I want the user to login

[Lift] Re: How do I go about implementing my own auth?

2009-12-07 Thread DMB
, Tim On 7 Dec 2009, at 14:14, Marius wrote: On Dec 7, 1:09 pm, DMB combust...@gmail.com wrote: Basically here's what I want to accomplish: 1. I want the user to login through a simple form on /index.html - this is the only unprotected page on the site. User does not have a user name

[Lift] Re: How do I go about implementing my own auth?

2009-12-07 Thread DMB
navigation rules, security semantics, etc. SiteMap is much more then just a menu. But at the end of the day it's your choice. Br's, Marius On Dec 7, 11:32 pm, DMB combust...@gmail.com wrote: SiteMap is out of the question. I don't need it at all on my site, by design. I like the way

[Lift] Error when uploading large files

2009-12-06 Thread DMB
I'm getting this one in M7 when trying to upload a 8MB image file. Smaller files work just fine. It would empirically seem that I'm running against some kind of limit somewhere. If that's the case, is there a way to raise the limit? Message: org.apache.commons.fileupload.FileUploadBase

[Lift] Re: Error when uploading large files

2009-12-06 Thread DMB
Never mind, found the setting: LiftRules.maxMimeSize = 25 * 1024 * 1024 LiftRules.maxMimeFileSize = 25 * 1024 * 1024 On Dec 6, 10:48 pm, DMB combust...@gmail.com wrote: I'm getting this one in M7 when trying to upload a 8MB image file. Smaller files work just fine. It would

[Lift] Re: Image upload and serving example

2009-12-01 Thread DMB
Just what I was looking for, thanks! By the way, is there a way to assign a name attribute to a file upload input field? The reason is I have a legacy piece of code that does HTTP uploads by simulating a form submit. This code requires that the form field name be known in advance, for obvious

[Lift] Re: Image upload and serving example

2009-12-01 Thread DMB
You don't even need f.get in there as it turns out. f.get should just be file. Beautiful. Thanks for the tip. On Dec 1, 8:07 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Dec 1, 2009 at 8:03 PM, DMB combust...@gmail.com wrote: Ended up doing this:    def show(xhtml: NodeSeq

[Lift] Re: Hitting a compiler bug (it seems)

2009-11-17 Thread DMB
iterate over the list produced by Master.getMastersWithTags(sy, sm) and produce a sequence of objects. NetBeans says: type mismatch: found: List[Master] required: net.liftweb.common.Box[?] and I'm not sure what exactly this means. Could someone clarify? On Nov 16, 10:51 pm, DMB combust

[Lift] Re: Hitting a compiler bug (it seems)

2009-11-17 Thread DMB
the trick, but it's non-idiomatic. On Nov 17, 1:39 am, DMB combust...@gmail.com wrote: Darn it, apparently I'm not getting the more complex cases of for comprehensions at all. Returning a Box[Tag] from that function affected several other functions which expected Tag or null. So rather than

[Lift] Re: How to output un-escaped content from the database

2009-11-17 Thread DMB
Yup. This is also useful for writing out Javascript. On Nov 17, 6:27 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 17, 2009 at 6:25 AM, philip philip14...@gmail.com wrote: Hi, I am making a CMS, I have content in the database and I need to output it directly as HTML.

[Lift] How do I properly read a value from a cookie?

2009-11-16 Thread DMB
When I call findCookie it returns a Box. Then, the value on the cookie itself is also a box. Hence a ruby one-liner turns into something like: val cookie = S.findCookie(cookieName) if(cookie.isDefined) { val cookieVal = cookie.open_!.value.openOr(null) // Do something with the cookie

[Lift] Re: How do I properly read a value from a cookie?

2009-11-16 Thread DMB
out: for{   cookie - S.findCookie(cookieName)   value - cookie} doSomethingWithValue Regards On Mon, Nov 16, 2009 at 12:07 PM, DMB combust...@gmail.com wrote: When I call findCookie it returns a Box. Then, the value on the cookie itself is also a box. Hence a ruby one-liner turns

[Lift] Hitting a compiler bug (it seems)

2009-11-16 Thread DMB
I wonder if anyone else finds this stack trace familiar. As often is the case with non-mainstream languages, Google turns up nothing of value. The code fragment goes below. If I comment out the code inside the finally statement, everything compiles fine. If I keep it, I get the stack trace below.

[Lift] Re: Hitting a compiler bug (it seems)

2009-11-16 Thread DMB
) S.addCookie(c) } } it also compiles OK. I don't feel comfortable with the change, though, since List could contain a null, which tags.last would gladly return. On Nov 16, 8:45 pm, DMB combust...@gmail.com wrote: I wonder if anyone else finds this stack trace familiar. As often

[Lift] Re: How do I properly read a value from a cookie?

2009-11-16 Thread DMB
} doSomethingWithValue Regards On Mon, Nov 16, 2009 at 12:07 PM, DMB combust...@gmail.com wrote: When I call findCookie it returns a Box. Then, the value on the cookie itself is also a box. Hence a ruby one-liner turns into something like: val cookie = S.findCookie(cookieName

[Lift] Re: Hitting a compiler bug (it seems)

2009-11-16 Thread DMB
So after juggling the code around for a few more minutes I have narrowed it to if(tags.length == 0) { return null } being inside the try {} block. If I move it outside and keep everything else the same, the code compiles. On Nov 16, 8:51 pm, DMB combust...@gmail.com

[Lift] Re: Hitting a compiler bug (it seems)

2009-11-16 Thread DMB
if the bug may have been fixed in a later release. -Ross On Nov 17, 2009, at 12:06 AM, DMB wrote: So after juggling the code around for a few more minutes I have narrowed it to        if(tags.length == 0) {            return null        } being inside the try {} block. If I

[Lift] How do I guarantee that logic will execute before render?

2009-11-15 Thread DMB
Here's a simple problem. I have a web page which is supposed to display a gallery. The page has two snippets in it. One of the snippets is month/year selector, which takes (in the order of priority) URL parameters or cookies and renders year/month selections accordingly. This month/year selector

[Lift] Re: How do I guarantee that logic will execute before render?

2009-11-15 Thread DMB
Pollak feeder.of.the.be...@gmail.com wrote: On Sun, Nov 15, 2009 at 2:46 AM, DMB combust...@gmail.com wrote: Here's a simple problem. I have a web page which is supposed to display a gallery. The page has two snippets in it. One of the snippets is month/year selector, which takes

[Lift] Re: How do I hook up JS events to onsubmit on a lift-controlled form?

2009-09-19 Thread DMB
, DMB combust...@gmail.com wrote: Hi, folks, I'm moving one of my old ruby based apps over to Scala/Lift to learn Lift better, and here's one thing I was not able to find how to do. Some forms in the old app have onsubmit event on the form tag which combines / pre-validates things

[Lift] Re: SHtml.submit doesn't call its callback

2009-09-11 Thread DMB
And now it does call its callback. All I did was I removed the placeholders for hidden fields (e.g. input type=hidden /). What the heck. A bit too much mystery for comfort, but I'm glad it works now. On Sep 10, 6:05 pm, DMB combust...@gmail.com wrote: Here's the problem. I have a simple form

[Lift] Re: 1.0.2 released

2009-09-11 Thread DMB
, David Pollak feeder.of.the.be...@gmail.com wrote: Did you update your pom.xml file to set the lift version to 1.0.2? I just created a new project with 1.0.2 and it does not display this issue. On Thu, Sep 10, 2009 at 5:55 PM, DMB combust...@gmail.com wrote: You mean this guy? It's still

[Lift] Re: SHtml.submit doesn't call its callback

2009-09-11 Thread DMB
Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Sep 10, 2009 at 9:25 PM, DMB combust...@gmail.com wrote: And now it does call its callback. All I did was I removed the placeholders for hidden fields (e.g. input type=hidden /). What the heck. A bit too much mystery for comfort, It's too

[Lift] Re: 1.0.2 released

2009-09-10 Thread DMB
You mean this guy? It's still there it seems. java.lang.NoSuchFieldException: refSet at java.lang.Class.getDeclaredField(Class.java:1882) at net.liftweb.http.PointlessActorToWorkAroundBug$$anonfun$act $2$$anonfun$apply$2.apply(LiftServlet.scala:722) at

[Lift] How do I hook up JS events to onsubmit on a lift-controlled form?

2009-09-08 Thread DMB
Hi, folks, I'm moving one of my old ruby based apps over to Scala/Lift to learn Lift better, and here's one thing I was not able to find how to do. Some forms in the old app have onsubmit event on the form tag which combines / pre-validates things in the form, puts the output into a hidden