[Lift] Re: Thoughts on file streaming

2009-07-01 Thread Vlad Seryakov
It is not about dropping Lift, it is about starting to use it. I want it very much but i need to consider all pluses and minuses before we jump in. External server for uploading could be a solution but it will not be in Scala and will require some other tools to be involved. I am still looking

[Lift] Maven License Expired

2009-07-01 Thread Peter Robinett
Hi all, I just launched Maven and got the following error: $ mvn jetty:run ## ZeroTurnaround JavaRebel 1.2.2 (200812021546) (c) Copyright Webmedia, Ltd, 2007, 2008. All rights reserved. YOUR JAVAREBEL LIMITED LICENSE HAS EXPIRED!

[Lift] Re: Maven License Expired

2009-07-01 Thread Timothy Perrett
Hey Peter, That is odd! I'll speak with the folk at javarebel and get them to give us a new license file for the comunity. Cheers Tim Sent from my iPhone On 1 Jul 2009, at 08:28, Peter Robinett pe...@bubblefoundry.com wrote: Hi all, I just launched Maven and got the following error:

[Lift] Re: Thoughts on file streaming

2009-07-01 Thread Viktor Klang
On Tue, Jun 30, 2009 at 11:32 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Jun 30, 2009 at 2:22 PM, Viktor Klang viktor.kl...@gmail.comwrote: Create a tmp-file, store the localpath in S.param and register a delete on request done will be more streamlined than potentially

[Lift] net.liftweb.util.ActorPingException: ActorBug could not be scheduled

2009-07-01 Thread Ewan
For the last couple of weeks I have been getting the following exception when saving causing a jetty reload. Seems it was raised in May in this group with a suggested work around of setting the jetty scan interval to 0 seconds - is this the only way? I guess I'm only now seeing as I recently

[Lift] Re: Maven License Expired

2009-07-01 Thread TylerWeir
You're using an old version, grab 2.0.1 and try that. 1.X may have expired. On Jul 1, 3:46 am, Timothy Perrett timo...@getintheloop.eu wrote: Hey Peter, That is odd! I'll speak with the folk at javarebel and get them to   give us a new license file for the comunity. Cheers Tim Sent

[Lift] Re: Maven License Expired

2009-07-01 Thread Timothy Perrett
The way we are handling it in the installer is all JR users have a .lic file for the license... The actual JAR for javarebel is separate so I think it would still persist to be an issue. Either way, I've gotten in touch with Jevgeni to see what he says. Cheers, Tim On 01/07/2009 11:19,

[Lift] Setting Session Timeout?

2009-07-01 Thread Ewan
I have recently started using a SessionVar and am quite happy to have the session wiped after some predefined interval. As an experiment I changed the session timeout in the web.xml a la Java Servlets but this had no effect running on jetty and since I have read that a SessionVar is not just a

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread marius d.
LiftSession is bound to HttpSession through HttpSessionBindingListener and HttpSessionActivationListener This means that when the HTTP session terminates LiftSession will also terminate. To verify your SessionVar that the session was purged you can implement override protected def

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread Ewan
Thanks Marius I basically wound the session timeout down to 5 mins in the web.xml and left it for about 30 mins but the sessionVar was still full. Even after some hours of no use it was the same. There is this constant ajax_request pinging going on - related? -- Ewan On Jul 1, 12:32 pm,

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread marius d.
You answered your own question :) ... Yes that is Lift GC mechanism. You can of course turn it off in Boot by calling LiftRules.enableLiftGC=false but I would not recommend it. Is there a real use case why you need this or just tying to figure out how Lift works ? Br's, Marius On Jul 1,

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread marius d.
Well I think I can commit something very simple that could help you, Currently session expiration mechanism considered only the time threshold ... but the lift GC is keeping it alive. So we can have LiftSession#terminateHint function that just marks a flag on this LiftSession. SessionMaster can

[Lift] Re: Maven License Expired

2009-07-01 Thread Peter Robinett
Yep, in /Applications/liftweb-1.0/java-rebel/ I have both a javarebel.jar and a javarebel.lic. Removing both of those 1.2.2 files and copying in the 2.0.1 jar works, though it says it's only licensed for a 30 day trial. Timothy, if you can get a longer license that would be awesome. Thanks!

[Lift] Re: Maven License Expired

2009-07-01 Thread Timothy Perrett
I've mailed Jevgeni (at javarebel), so will see what's what. If he doesn't come back in a day or two I'll try to get in touch with him again. Cheers, Tim On 01/07/2009 16:18, Peter Robinett pe...@bubblefoundry.com wrote: Yep, in /Applications/liftweb-1.0/java-rebel/ I have both a

[Lift] Re: Thoughts on file streaming

2009-07-01 Thread Andrew Scherpbier
It would also be nice to be able to provide progress feedback. The page returned after the form submission can then use comet to display a progress bar or something like that. (The media upload at Vimeo comes to mind as a good example of this!) Also, I would suggest some smarts when

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread David Pollak
Ewan, It seems that you've done your tests with a browser open to a page in your Lift app. It seems to me that you don't want to time out a session unless the user's browser is no longer looking at a page in the app. Is this in line with your expectations/use case? Thanks, David On Wed, Jul

[Lift] Re: Maven License Expired

2009-07-01 Thread Mark Lynn
On a related note, I recently posted that JavaRebel in its latest version does not even seem to be working properly http://groups.google.com/group/liftweb/browse_thread/thread/58b81c09e409d9d7# Seems like a great tool, but not of much value with the 2.0.1 jar. Mark Lynn On Jul 1, 2009, at

[Lift] Re: Maven License Expired

2009-07-01 Thread Jevgeni Kabanov
Interestingly enough I didn't get an email from Tim yet, but I got a google alert for this message :) The original free Scala license was given for a limited period to be prolonged (or not) later. We knew that the current license is ending on 30th June and have already decided to prolong it.

[Lift] Re: Thoughts on file streaming

2009-07-01 Thread David Pollak
K... I'll check some code in later today. On Wed, Jul 1, 2009 at 9:05 AM, Andrew Scherpbier and...@scherpbier.orgwrote: It would also be nice to be able to provide progress feedback. The page returned after the form submission can then use comet to display a progress bar or something like

[Lift] Re: Thoughts on file streaming

2009-07-01 Thread David Pollak
Okay... I've checked in new code. In LiftRules, there's: /** * The function that converts a fieldName, contentType, fileName and an InputStream into * a FileParamHolder. By default, create an in-memory instance. Use OnDiskFileParamHolder * to create an on-disk version */ var

[Lift] Lift Design

2009-07-01 Thread sjtirtha
Hi, I just started using Lift. Somehow, I got the feeling that Lift is over lean. In a Model Class, you can define every thing, from which validation to which field should appear in UI. Isn't it contradiction with the concept of separation of concern Regards, Steve

[Lift] Re: Lift Design

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 12:04 PM, sjtirtha sjtir...@gmail.com wrote: Hi, I just started using Lift. Somehow, I got the feeling that Lift is over lean. In a Model Class, you can define every thing, from which validation to which field should appear in UI. Isn't it contradiction with the

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread Ewan
H I understand the issue/feature now... where by if the page remains open then the session is kept alive by the ajax request which is a feature and it could be argued that for almost all cases this would be what is required. I believe there is a use case for wanting the session to expire

[Lift] Re: Setting Session Timeout?

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 12:24 PM, Ewan ehar...@gmail.com wrote: H I understand the issue/feature now... where by if the page remains open then the session is kept alive by the ajax request which is a feature and it could be argued that for almost all cases this would be what is required.

[Lift] Re: Thoughts on file streaming

2009-07-01 Thread Andrew Scherpbier
Wow! This is very cool. Can't wait to try it out. --Andrew David Pollak wrote: Okay... I've checked in new code. In LiftRules, there's: /** * The function that converts a fieldName, contentType, fileName and an InputStream into * a FileParamHolder. By default, create an in-memory

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Peter Robinett
Thanks, David. Unfortunately I'm having a hard time figuring out how to get the foundParam. Using your code, I have: val loc = for {req - S.request; loc - req.location} yield loc val l = loc openOr Couldn't open println(loc) println(l) The first println give me: Full(Loc(View List(nodes),

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Naftoli Gugenhem
Well if the box is empty l will be a String so of course you can't access foundParam. - Peter Robinettpe...@bubblefoundry.com wrote: Thanks, David. Unfortunately I'm having a hard time figuring out how to get the foundParam. Using your code, I have: val

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Naftoli Gugenhem
Instead of yielding loc which is taking it out of the box and putting it back in, access foundParam inside the for loop. - Peter Robinettpe...@bubblefoundry.com wrote: Thanks, David. Unfortunately I'm having a hard time figuring out how to get the

[Lift] Re: grabbing rss or other type of feeds within lift

2009-07-01 Thread Mark Essel
Thanks David. I'm going with some direct calls for simplicity (along the path you suggested). along the lines of: val rssFeed = XML.load( (new URL (feedUrl)).openConnection.getInputStream ) One more oddity, I'm getting problems compiling normal scala code but I can build lift projects (with

[Lift] Re: grabbing rss or other type of feeds within lift

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 2:16 PM, Mark Essel mes...@gmail.com wrote: Thanks David. I'm going with some direct calls for simplicity (along the path you suggested). along the lines of: val rssFeed = XML.load( (new URL (feedUrl)).openConnection.getInputStream ) One more oddity, I'm getting

[Lift] Re: can a Snippet call a Snippet?

2009-07-01 Thread g-man
I will look into the nested snippets. For expediency, I folded all the snippets that interact with my template into one file, so I can concentrate on the business logic. For my Todo app enhancement, I need to pass the id of my selected Tag (which I have confirmed is correctly gathered from the

[Lift] Changes to ajax handling?

2009-07-01 Thread Kris Nuttycombe
Hi, all, Have there been recent changes made to liftAjax.js? I am encountering new errors from an ajaxSelect() today that were not present yesterday. Firebug complains: Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible. [Break on this error]

[Lift] Re: Changes to ajax handling?

2009-07-01 Thread Kris Nuttycombe
To answer my own question, looking over the commit log 28595307 looks extremely suspicious. I can revert it locally but would prefer a mainline fix, and don't want to attempt it myself. Marius? Kris On Wed, Jul 1, 2009 at 3:33 PM, Kris Nuttycombekris.nuttyco...@gmail.com wrote: Hi, all, Have

[Lift] Re: can a Snippet call a Snippet?

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 2:28 PM, g-man gregor...@gmail.com wrote: I will look into the nested snippets. For expediency, I folded all the snippets that interact with my template into one file, so I can concentrate on the business logic. For my Todo app enhancement, I need to pass the id of

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 2:02 PM, Peter Robinett pe...@bubblefoundry.comwrote: Thanks, David. Unfortunately I'm having a hard time figuring out how to get the foundParam. Using your code, I have: val loc = for {req - S.request; loc - req.location} yield loc val l = loc openOr Couldn't open

[Lift] Re: grabbing rss or other type of feeds within lift

2009-07-01 Thread Mark Essel
Thanks think I'm making progress following this: http://wiki.netbeans.org/Scala after the install of 6.7RC3, jdk, scala plugin, lift, maven (used it to get a test lift project) my lift project worked with scala code inside the project but what I didn't do was set SCALA_HOME, my class path

[Lift] unit test framework

2009-07-01 Thread ph
This question might be obvious to most of the people here, but since I new to Scala and Java I'm not clear Maven generates 2 different unit test files: MySpec specs AppTest junit running mvn test invokes AppTest (and other test cases with annotation @Test) running from Eclipse project as

[Lift] Re: grabbing rss or other type of feeds within lift

2009-07-01 Thread Naftoli Gugenhem
Which maven plugin did you try for eclipse? M2eclipse works for me... - Mark Esselmes...@gmail.com wrote: Thanks think I'm making progress following this: http://wiki.netbeans.org/Scala after the install of 6.7RC3, jdk, scala plugin, lift, maven (used it to

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Peter Robinett
Thanks Naftoli and David, I'm starting to understand what I need to do. However, the solution has revealed a gap in my beginner's knowledge of Scala: why was my code printing out the Loc instead of Couldn't open? Second, even with foundParam.is within the for comprehension, I still need to get

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 3:34 PM, Peter Robinett pe...@bubblefoundry.comwrote: Thanks Naftoli and David, I'm starting to understand what I need to do. However, the solution has revealed a gap in my beginner's knowledge of Scala: why was my code printing out the Loc instead of Couldn't open?

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Naftoli Gugenhem
A Box is a container that holds 0 or 1 elements(s). openOr means if the Box is Full return the element; otherwise return the parameter--my default value. One alternative approach would be to specify a default Loc. - Peter Robinettpe...@bubblefoundry.com

[Lift] Re: unit test framework

2009-07-01 Thread etorreborre
Hi, My understanding is that historically the first tests for lift were proposed as JUnit tests. Then I implemented a few tests using specs (which I created), mostly for the lift-util module. Now, to answer your question, specs is compatible with JUnit, so you can write specs and make them

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Peter Robinett
On Jul 1, 3:38 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Are you coming from Java/C# or Ruby/Python? PHP, Python and Javascript I don't think you have to pull the value out of the for comprehension... do all the work inside the for comprehension. When you're doing your design,

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 4:00 PM, Peter Robinett pe...@bubblefoundry.comwrote: On Jul 1, 3:38 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Are you coming from Java/C# or Ruby/Python? PHP, Python and Javascript Okay... makes sense. Yes, the reference contained a Loc, but the

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Peter Robinett
Everyone, I apologize for monopolizing the list but this has been very helpful for me. I've learned a bunch from similar, old entries in the list and hope this thread will help future Lift beginners. On to my reply to David: On Jul 1, 4:19 pm, David Pollak feeder.of.the.be...@gmail.com wrote:

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Naftoli Gugenhem
If you know the Box is full you can write open_! (you'll get a runtime error if it wasn't). Otherwise openOr a default, e.g., an invalid id. You have first answer the question, what _should_ happen if it's Empty after all? :) - Peter

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread Peter Robinett
Thanks, Naftoli. For now open_! does the trick for me. Peter On Jul 1, 5:55 pm, Naftoli Gugenhem naftoli...@gmail.com wrote: If you know the Box is full you can write open_! (you'll get a runtime error if it wasn't). Otherwise openOr a default, e.g., an invalid id. You have first answer the

[Lift] Building from source - error importing _root_.org.specs

2009-07-01 Thread Calen Pennington
Hi, I'm trying to build Lift from the source. I pulled the latest source from git, and ran cd liftweb mvn install as suggested in the wiki (http://wiki.liftweb.net/index.php/ Source_code) When I did this, I got a large number of warnings like the following: [WARNING]

[Lift] Re: Building from source - error importing _root_.org.specs

2009-07-01 Thread David Pollak
I've built Lift from source on Windows, Linux and Mac OS X within the last 2 days without incident. What OS are you running, what version of Maven and what version of Java? On Wed, Jul 1, 2009 at 8:00 PM, Calen Pennington calen.penning...@gmail.com wrote: Hi, I'm trying to build Lift from

[Lift] Re: Modify CRUDify XHTML

2009-07-01 Thread David Pollak
On Wed, Jul 1, 2009 at 7:39 PM, Peter Robinett pe...@bubblefoundry.comwrote: Thanks, Naftoli. For now open_! does the trick for me. Please do not use open_! The ! is there for a reason... it means use this at your peril. Either use openOr and have the expression on the right side of the

[Lift] Re: can a Snippet call a Snippet?

2009-07-01 Thread g-man
I'm getting a Null Pointer: 'Trying to open an empty box', from S.attr (todos).open_! Here's my layout: todo.html template lift:TD.listTodos todos=todos --- Todo list table stuff --- lift:TD.listTags tags=tags --- Tag list table stuff (where the selection to filter comes from)

[Lift] Re: can a Snippet call a Snippet?

2009-07-01 Thread Naftoli Gugenhem
Where is the second list getting called from? Code? - g-mangregor...@gmail.com wrote: I'm getting a Null Pointer: 'Trying to open an empty box', from S.attr (todos).open_! Here's my layout: todo.html template lift:TD.listTodos todos=todos

[Lift] Re: Changes to ajax handling?

2009-07-01 Thread marius d.
On Jul 2, 12:40 am, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: To answer my own question, looking over the commit log 28595307 looks extremely suspicious. I can revert it locally but would prefer a mainline fix, and don't want to attempt it myself. Marius? Kris On Wed, Jul 1, 2009