[Lift] Re: error tickets?

2009-05-10 Thread g-man
The idea is that the user never sees any internal errors -- if one does happen, it gets ticketed to '/templates-hidden', a redirect occurs, and stuff like this: XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8080/ Line Number 29, Column 15: ---^ ...is neve

[Lift] Re: Confusion about Lift-Core

2009-05-10 Thread Charles F. Munat
So really there is no lift core, it's just a combination of other modules? Chas. Timothy Perrett wrote: > You would use lift core if you wanted to include all this jars in your > project. It in itself does not "do" anything and it's just a pom module. > > Does that help? > > Cheers, Tim > >

[Lift] Re: LoanWrapper

2009-05-10 Thread Charles F. Munat
Hmmm. Very interesting. I get the gist of it, but I'm going to have to play with it a bit before I understand how it really works. Thanks! I figured there was a good reason for the name, but didn't think to look for a design pattern. Chas. Timothy Perrett wrote: > I think you'll find it's cal

[Lift] Re: LoanWrapper

2009-05-10 Thread Timothy Perrett
Here's an example: S.addAround(List(new LoanWrapper { def apply[T](f: => T): T = { val (time,result) = TimeHelpers.calcTime(f) def logTime = Log.info("test took "+time+" Milliseconds") result match { case (_,Full(_)) => logTime case Full(_) => logTime

[Lift] Re: error tickets?

2009-05-10 Thread Timothy Perrett
Are you needing clarification on this? This should get you started: LiftRules.exceptionHandler.prepend { case (_, _, exception) => { Log.error(exception.getStackTrace.toString) RedirectResponse("/") } } Cheers, Tim On May 10, 4:05 pm, g-man wrote: > The idea is

[Lift] Re: Tail merge?

2009-05-10 Thread Timothy Perrett
Yeah google analytics is a good use case. I think talking about smashing static files is off topic, but there is some value in having a tail merge for when you want to put stuff in just before the body tag. My only thinking right now is that why do we need a specific snippet to do this? Right now,

[Lift] Re: Tail merge?

2009-05-10 Thread David Pollak
On Sun, May 10, 2009 at 7:02 AM, marius d. wrote: > > > > On May 10, 4:57 pm, David Pollak > wrote: > > On Sun, May 10, 2009 at 6:55 AM, marius d. > wrote: > > > > > People can choose to "smash" multiple js/css files into a single one, > > > in fact it is a common practice. However for scripts

[Lift] Re: Tail merge?

2009-05-10 Thread Viktor Klang
What I've been noodling about for some time is to have dependency management as a part of the framework. That could be easily obtained by having widgets etc register their dependencies in a SessionVar[List[Dependency]] and then simply add a DispatchPF to serve those dependencies as one package with

[Lift] Re: error tickets?

2009-05-10 Thread David Pollak
On Sun, May 10, 2009 at 8:05 AM, g-man wrote: > > The idea is that the user never sees any internal errors -- if one > does happen, it gets ticketed to '/templates-hidden', a redirect > occurs, and stuff like this: > > XML Parsing Error: prefix not bound to a namespace > Location: http://localhos

[Lift] Re: joao invites you to try out FriendFeed

2009-05-10 Thread David Pollak
Folks, Messages to join social networking sites are not acceptable on this list. The person who sent this message will find all of his future posts to the Lift list moderated. A very cranky David On Sun, May 10, 2009 at 9:22 AM, joao wrote: > > Message from joao: > > I've been using FriendFeed

[Lift] Re: LoanWrapper

2009-05-10 Thread Charles F. Munat
It will after I review some stuff about types and look through some more source code. Thanks! Chas. Timothy Perrett wrote: > Here's an example: > > S.addAround(List(new LoanWrapper { > def apply[T](f: => T): T = { > val (time,result) = TimeHelpers.calcTime(f) > def logTime = L

[Lift] Re: Tail merge?

2009-05-10 Thread marius d.
On May 10, 10:08 pm, Viktor Klang wrote: > What I've been noodling about for some time is to have dependency management > as a part of the framework. That could be easily obtained by having widgets > etc register their dependencies in a SessionVar[List[Dependency]] and then > simply add a Dispa

[Lift] How forms work (the life cycle of request)

2009-05-10 Thread erik.karls...@iki.fi
Hi, I'm asking some questions again :) This time it is about form handling. I tried to get the idea from source code but I think it would be easier if some one wiser could open it a bit. Here is my understanding, please correct me if it is incorrect: 1. I have snippet (TeamSnippet) with "add" f

[Lift] Re: Tail merge?

2009-05-10 Thread KWright
Been thinking about this more, just trying to explore where this idea leads: - Where tail merge would really shine is that a snippet could be embedded inside a div tag, for example, but still have a tail pushed to the end of the page body. - Script entries in the head and tail blocks could be qui

[Lift] Re: Write access to the id field of ProtoUser (for testing)

2009-05-10 Thread David Pollak
On Sun, May 10, 2009 at 3:17 AM, erik.karls...@iki.fi < erik.b.karls...@gmail.com> wrote: > > Hi, > > It may happen that this post appears twice to this forum - in that > case sorry for the double posting ;) New users are moderated to avoid spam... on weekends, it may take up to a day for postin

[Lift] Re: How forms work (the life cycle of request)

2009-05-10 Thread David Pollak
On Sun, May 10, 2009 at 1:35 PM, erik.karls...@iki.fi < erik.b.karls...@gmail.com> wrote: > > Hi, > > I'm asking some questions again :) This time it is about form > handling. I tried to get the idea from source code but I think it > would be easier if some one wiser could open it a bit. > > Here

[Lift] Re: Confusion about Lift-Core

2009-05-10 Thread Timothy Perrett
You would use lift core if you wanted to include all this jars in your project. It in itself does not "do" anything and it's just a pom module. Does that help? Cheers, Tim Sent from my iPhone On 10 May 2009, at 07:49, "Charles F. Munat" wrote: > > What exactly is Lift-Core. When I read Cha

[Lift] Re: LoanWrapper

2009-05-10 Thread Timothy Perrett
I think you'll find it's called that because it's a part of a pattern. If you google "loan pattern" you'll get a scala wiki answer that should help you :-) Cheers, Tim Sent from my iPhone On 10 May 2009, at 07:59, "Charles F. Munat" wrote: > > Why is it called "LoanWrapper"? > > Chas. > >

[Lift] Re: LoanWrapper

2009-05-10 Thread Timothy Perrett
For completeness: http://scala.sygneca.com/patterns/loan Cheers, Tim On May 10, 10:41 am, Timothy Perrett wrote: > I think you'll find it's called that because it's a part of a pattern.   > If you google "loan pattern" you'll get a scala wiki answer that   > should help you :-) > > Cheers, Tim

[Lift] Re: Tail merge?

2009-05-10 Thread KWright
Me or marius? Personally, I'm full of ideas :) On May 9, 1:26 am, Timothy Perrett wrote: > Sounds like this could be a neat addition. Looking forward to see what you > come up with :-) > > Cheers, Tim > > On 08/05/2009 20:19, "marius d." wrote: > > > > > > > A built in snippet might me a good

[Lift] Write access to the id field of ProtoUser (for testing)

2009-05-10 Thread erik.karls...@iki.fi
Hi, I would like to use ProtoUser in my unit test so that I could set it's id's value. One way to do this is that I would create a mock object of the ProtoUser and then define what the id returns. However, I would rather like to use just the real class as it is. Is there a possibility to give the

[Lift] Re: How to log exceptions?

2009-05-10 Thread sailormoo...@gmail.com
Hi: Where can I find the code of the default ExceptionHandler?? Thanks. --~--~-~--~~~---~--~~ 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 fro

[Lift] Write access to the id field of ProtoUser (for testing)

2009-05-10 Thread erik.karls...@iki.fi
Hi, It may happen that this post appears twice to this forum - in that case sorry for the double posting ;) Anyhow, I have following case. For unit test case I would need to be able to define what is the value the id field in ProtoUser returns. I know that I could handle this by just creating a

[Lift] Html compress

2009-05-10 Thread sailormoo...@gmail.com
Hi : I would like to know if there is a way as a filter to compress html files to make html file smaller? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to

[Lift] Re: Html compress

2009-05-10 Thread David Pollak
On Sun, May 10, 2009 at 5:38 AM, sailormoo...@gmail.com < sailormoo...@gmail.com> wrote: > > Hi : > > I would like to know if there is a way as a filter to compress html > files to make html file smaller? Do you mean "remove comments" as the HTML is being converted into a byte-stream or do you

[Lift] Re: Confusion about Lift-Core

2009-05-10 Thread David Pollak
A long time ago, I insisted that Lift was everything that we had in all the Lift packages. When DavidB split Lift into different packages, he called the "whole thing that includes all Lift packages" Lift Core. It would probably be better named "Lift Bloat" (this is a joke), but it is what it is.

[Lift] Re: How to log exceptions?

2009-05-10 Thread David Pollak
It's in LiftRules at line 694: /** * The sequence of partial functions (pattern matching) for handling converting an exception to something to * be sent to the browser depending on the current RunMode (development, etc.) * * By default it returns an XhtmlResponse containing a predefi

[Lift] Re: Tail merge?

2009-05-10 Thread David Pollak
On Fri, May 8, 2009 at 5:26 PM, Timothy Perrett wrote: > > > Sounds like this could be a neat addition. Looking forward to see what you > come up with :-) > I'm not 100% keen on it. Loading a ton of stuff into the HTML page (rather than having stuff cached by the browser) makes for larger page s

[Lift] Re: Tail merge?

2009-05-10 Thread marius d.
People can choose to "smash" multiple js/css files into a single one, in fact it is a common practice. However for scripts that can be deferred putting them at the bottom of the page can improve rendering. Br's, Marius On May 10, 4:42 pm, David Pollak wrote: > On Fri, May 8, 2009 at 5:26 PM, Ti

[Lift] Re: Tail merge?

2009-05-10 Thread David Pollak
On Sun, May 10, 2009 at 6:55 AM, marius d. wrote: > > People can choose to "smash" multiple js/css files into a single one, > in fact it is a common practice. However for scripts that can be > deferred putting them at the bottom of the page can improve rendering. Okay.. so we're not actually pu

[Lift] Re: Tail merge?

2009-05-10 Thread marius d.
On May 10, 4:57 pm, David Pollak wrote: > On Sun, May 10, 2009 at 6:55 AM, marius d. wrote: > > > People can choose to "smash" multiple js/css files into a single one, > > in fact it is a common practice. However for scripts that can be > > deferred putting them at the bottom of the page can i

[Lift] Re: Tail merge?

2009-05-10 Thread Alexander Kellett
fyi. if you smash css into a single file but continue using relative urls in the css you'll end up with a slower page in the case that you're using asset hosts to work around the browsers http connection limit. when smashing into one file make sure to also apply the asset host trick to any url() s

[Lift] Re: Confusion about Lift-Core

2009-05-10 Thread Heiko Seeberger
Lift Bloat: LOL!!! 2009/5/10 David Pollak > A long time ago, I insisted that Lift was everything that we had in all the > Lift packages. When DavidB split Lift into different packages, he called > the "whole thing that includes all Lift packages" Lift Core. It would > probably be better named

[Lift] joao invites you to try out FriendFeed

2009-05-10 Thread joao
Message from joao: I've been using FriendFeed, a great way to share things with my friends and family. I thought you might like to try it out, too. Check out my feed here: http://friendfeed.com/joaopereira -- To give FriendFeed a try, visit http://friendfeed.com/invite?code=6COvuEHBLL To s

[Lift] Re: Tail merge?

2009-05-10 Thread Bryan.
A nice use for this "tail merge" would be for the Google Analytics tracking code, especially the ecommerce tracking code. Here's something to keep an eye on as well: http://blog.digg.com/?p=621 -- still very new and in development. --Bryan On May 10, 9:57 am, David Pollak wrote: > On Sun, May