Re: [Lift] Javascript Dependencies

2010-02-25 Thread Jeppe Nejsum Madsen
Peter Robinett pe...@bubblefoundry.com writes: Hi all, [...] // Usage in boot.scala val myJsScript = new JsScript(flot :: jquery.flot.selectable.js :: Nil) ResourceServer.allow(myJsScript.allowResource) // Usage in a normal snippet def mySnippet = { head {

[Lift] Logging, part 2

2010-02-25 Thread Jeppe Nejsum Madsen
Hi, I'm about to start sprinkling the new logging code over some of Lift's internals. But first, the logging backend needs configuring. When the dust has settled and the new logging code is fully implemented, this needs to happen in a client app: 1) Choose a logging backend and add the

Re: [Lift] Re: This is the style of SQL persistence that I like ...

2010-02-25 Thread Jeppe Nejsum Madsen
On Thu, Feb 25, 2010 at 7:36 AM, aw anth...@whitford.com wrote: On Feb 24, 12:47 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: We're currently using Rails migrations and I've been thinking if putting migrations into the app is really the right approach? What happens if migrations fail? It's

[Lift] Re: Logging, part 2

2010-02-25 Thread Marius
I'd opt in for something like: LiftRules.logger = Log4J or LiftRule.logger = MyOwnLogger Br's, Marius On Feb 25, 11:23 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, I'm about to start sprinkling the new logging code over some of Lift's internals. But first, the logging backend

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Timothy Perrett
+1 This fits with the idioms we already have. Although, so Lift doesn't carry a default dependency it would probably need to be: // default LiftRules.logger = NoLogger Or something... Cheers, Tim On 25 Feb 2010, at 09:32, Marius wrote: I'd opt in for something like: LiftRules.logger =

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Jeppe Nejsum Madsen
On Thu, Feb 25, 2010 at 10:32 AM, Marius marius.dan...@gmail.com wrote: I'd opt in for something like: LiftRules.logger = Log4J Agree this fits the current idioms, but how should this be triggered? The new logging code is in lift-common so cannot call stuff in LiftRules. Note we're not

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Jeppe Nejsum Madsen
On Thu, Feb 25, 2010 at 10:53 AM, Timothy Perrett timo...@getintheloop.eu wrote: +1 This fits with the idioms we already have. Although, so Lift doesn't carry a default dependency it would probably need to be: // default LiftRules.logger = NoLogger I'm not sure this is worth it. It's

[Lift] Re: Logging, part 2

2010-02-25 Thread Marius
Then perhaps: LiftRules.initLogger(Log4J) On Feb 25, 12:16 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On Thu, Feb 25, 2010 at 10:32 AM, Marius marius.dan...@gmail.com wrote: I'd opt in for something like: LiftRules.logger = Log4J Agree this fits the current idioms, but how should

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Jeppe Nejsum Madsen
On Thu, Feb 25, 2010 at 11:44 AM, Marius marius.dan...@gmail.com wrote: Then perhaps: LiftRules.initLogger(Log4J) I'll buy that :-) /Jeppe -- 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.

Re: [Lift] Signup validation

2010-02-25 Thread Adam Warski
Hello, ticket created: http://www.assembla.com/spaces/liftweb/tickets/368 On Feb 24, 2010, at 6:28 PM, David Pollak wrote: On Wed, Feb 24, 2010 at 7:33 AM, Adam Warski a...@warski.org wrote: Hello, I'm integrating recaptcha into a Lift app that uses MegaProtoUser, and there's one

[Lift] Re: Advice for maintaining application state

2010-02-25 Thread sean8223
Thanks for the tips, Tim. We have used StatefulSession for multi-page workflows, but it didn't occur to me to try it in this context. Sean On Feb 24, 2:55 pm, tiro tim.romb...@googlemail.com wrote: not sure if I posted the

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Naftoli Gugenheim
Why should an initLogger method be in LiftRules? - Mariusmarius.dan...@gmail.com wrote: Then perhaps: LiftRules.initLogger(Log4J) On Feb 25, 12:16 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On Thu, Feb 25, 2010 at 10:32 AM, Marius

[Lift] Re: Advice for maintaining application state

2010-02-25 Thread Marius
Why SessionVars are almost always a bad idea IMHO ? On Feb 24, 9:54 pm, tiro tim.romb...@googlemail.com wrote: Hi, I had a similar discussion on this list a while ago. http://groups.google.com/group/liftweb/browse_thread/thread/69898fb51... I haven't found THE idiomatic answer in Lift. For

Re: [Lift] Liftweb and XHTML Strict 1.0

2010-02-25 Thread Cliff Zhao
I just refreshed my environment. I am using Lift 2.0 snapshot dated 20100224204407. Cliff On Wed, Feb 24, 2010 at 10:41 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Feb 24, 2010 at 2:35 PM, Cliff Zhao zha...@gmail.com wrote: One of my project requirements is to be

Re: [Lift] Re: Liftweb and javascript

2010-02-25 Thread Cliff Zhao
Super. It removed all generated javascript code. Thank you very much. Best Regards, Cliff Zhao On Wed, Feb 24, 2010 at 7:00 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: LiftRules.enableLiftGC = false LiftRules.autoIncludeAjax = _ = false - Peter

Re: [Lift] Logging, part 2

2010-02-25 Thread Heiko Seeberger
On 25 February 2010 10:23, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: 2) Initialize the logging backend What needs to be initialized? Wouldn't auto initialization be nice? Heiko Company: weiglewilczek.com Blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala:

Re: [Lift] Logging, part 2

2010-02-25 Thread Jeppe Nejsum Madsen
On Thu, Feb 25, 2010 at 5:35 PM, Heiko Seeberger heiko.seeber...@googlemail.com wrote: On 25 February 2010 10:23, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: 2) Initialize the logging backend What needs to be initialized? Loading (dev|prod|default) property file that specifies appenders, log

Re: [Lift] RPC from Javascript/JQuery?

2010-02-25 Thread David Pollak
On Thu, Feb 25, 2010 at 8:43 AM, Rick R rick.richard...@gmail.com wrote: {jsonCall(pressed, JsRaw(event.which)).toJsCmd} How about: onkeypress={processKeyPress(function(a) {+jsonCall(pressed, JsRaw(a)).toJsCmd+})} This will pass a function to the processKeyPress method. If you

Re: [Lift] Liftweb and XHTML Strict 1.0

2010-02-25 Thread David Pollak
I am unable to reproduce this behavior. Can you post an example of your code to a GitHub project and open a ticket at https://liftweb.assembla.com/spaces/liftweb/tickets and I'll look into it. On Thu, Feb 25, 2010 at 7:53 AM, Cliff Zhao zha...@gmail.com wrote: I just refreshed my environment.

[Lift] bind(): suppress automatic attribute mixin

2010-02-25 Thread jasper
val xml = t:node attr=some/t:node with val processed = bind(t,xml, node - a /) becomes a attr=some/a How do I suppress the mixin of attr? Thank you, Jasper -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

Re: [Lift] RPC from Javascript/JQuery?

2010-02-25 Thread Rick R
That's funny, because I'm a Haskell coder. As soon as I hit Javascript, both sides of my brain turn off. I think it's the curly braces that do it. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: bind(): suppress automatic attribute mixin

2010-02-25 Thread Marius
1. what Lift version are you using? 2. Can you try with other attribute name or with multiple attributes? On Feb 25, 6:53 pm, jasper jasper.raedi...@gmail.com wrote: val xml = t:node attr=some/t:node with val processed = bind(t,xml, node - a /) becomes a attr=some/a How do I suppress

[Lift] Re: bind(): suppress automatic attribute mixin

2010-02-25 Thread jasper
I am using version 1.03. The name and amount of attributes does not matter. All attributes are being passed on. -- 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,

[Lift] Re: bind(): suppress automatic attribute mixin

2010-02-25 Thread jasper
I have also just realized that I forgot to prefix for the attributes above: val xml = t:node attr=some/t:node should have been: val xml = t:node t:attr=some/t:node The result stays the same (without the prefix): a attr=some/a Sorry for the mistake and the additional mail traffic! -- You

Re: [Lift] Re: bind(): suppress automatic attribute mixin

2010-02-25 Thread Ross Mellgren
The mixin behavior is a bug, and is fixed in 1.1 and 2.0. You should switch to 2.0-SNAPSHOT (or 2.0-M2 if you don't like SNAPSHOTs) unless you have a compelling reason to stay at 1.0 -Ross On Feb 25, 2010, at 12:13 PM, jasper wrote: I have also just realized that I forgot to prefix for the

[Lift] Using existing Javascript

2010-02-25 Thread Richard
I have pages that I've created with standard HTML forms and javascript validation. What is the fastest or best way to use them in my Lift app? Do I have to completely rewrite in Lift snippets using JsCmds in order to tie into the already named fields and form, or is there something I'm missing?

Re: [Lift] Lift and HTTP Session

2010-02-25 Thread Cliff Zhao
Fantastic support. Thank you very much. On Thu, Feb 25, 2010 at 2:01 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Feb 25, 2010 at 10:56 AM, Cliff Zhao zha...@gmail.com wrote: Does Lift alway create an HTTP session? If you go through the Lift templating system, yes.

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread David Pollak
On Thu, Feb 25, 2010 at 10:48 AM, Ross Mellgren dri...@gmail.com wrote: My concern about putting this in LiftRules is that not all applications that could benefit from the new logging support will use webkit, since the logging is in common. Maybe a bridge method in LiftRules to put it in a

Re: [Lift] Liftweb and XHTML Strict 1.0

2010-02-25 Thread Cliff Zhao
David, I have done some investigation and found: 1. The problem does not appear if I use lift:surround 2. It will appear if I do not use lift:surround, namely I do not use any template. My guess is: 1. using lift:surround, the html tag, which has the xmlns and xmlns:lift attribute, is in the

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Jeppe Nejsum Madsen
On Thu, Feb 25, 2010 at 7:48 PM, Ross Mellgren dri...@gmail.com wrote: My concern about putting this in LiftRules is that not all applications that could benefit from the new logging support will use webkit, since the logging is in common. Maybe a bridge method in LiftRules to put it in a

[Lift] Re: Advice for maintaining application state

2010-02-25 Thread tiro
because I haven't yet encountered a use case where they correspond to expected behaviour if the user happens to know how to work with a tabbed browser. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Ross Mellgren
My concern about putting this in LiftRules is that not all applications that could benefit from the new logging support will use webkit, since the logging is in common. Maybe a bridge method in LiftRules to put it in a convenient place, but I think the actual work should be exposed nearby the

Re: [Lift] Liftweb and XHTML Strict 1.0

2010-02-25 Thread David Pollak
On Thu, Feb 25, 2010 at 10:12 AM, Cliff Zhao zha...@gmail.com wrote: David, I have done some investigation and found: 1. The problem does not appear if I use lift:surround 2. It will appear if I do not use lift:surround, namely I do not use any template. My guess is: 1. using

[Lift] Re: Logging, part 2

2010-02-25 Thread Marius
Why not? LiftRules is about configuring a lift app at startup. On 25 feb., 16:56, Naftoli Gugenheim naftoli...@gmail.com wrote: Why should an initLogger method be in LiftRules? - Mariusmarius.dan...@gmail.com wrote: Then perhaps:

Re: [Lift] Lift and HTTP Session

2010-02-25 Thread David Pollak
On Thu, Feb 25, 2010 at 10:56 AM, Cliff Zhao zha...@gmail.com wrote: Does Lift alway create an HTTP session? If you go through the Lift templating system, yes. My code doesn't use any HTTP session, but in the very first request's response, I can see the Set-Cookie for JSESSIONID. Is

[Lift] Lift and HTTP Session

2010-02-25 Thread Cliff Zhao
Does Lift alway create an HTTP session? My code doesn't use any HTTP session, but in the very first request's response, I can see the Set-Cookie for JSESSIONID. Is there a way to write session free web applications with Lift? Thank you very much. Best Regards, Cliff Zhao -- You received

Re: [Lift] Using existing Javascript

2010-02-25 Thread Rick R
On Thu, Feb 25, 2010 at 12:40 PM, Richard richard.m.willi...@gmail.com wrote: I have pages that I've created with standard HTML forms and javascript validation. What is the fastest or best way to use them in my Lift app? Do I have to completely rewrite in Lift snippets using JsCmds in order to

Re: [Lift] Re: Logging, part 2

2010-02-25 Thread Naftoli Gugenheim
Wait, I misunderstood something. What's the difference between logger = X and initLogger(X)? - Mariusmarius.dan...@gmail.com wrote: Why not? LiftRules is about configuring a lift app at startup. On 25 feb., 16:56, Naftoli Gugenheim naftoli...@gmail.com wrote:

[Lift] The role of LiftRules

2010-02-25 Thread Naftoli Gugenheim
Hi, I'd like to get some opinions on the following. You may want to read http://reviewboard.liftweb.net/r/158/. I have on Review Board a patch for some date-and-time parsing and formatting configuration. I put the settings inside a singleton object called ConversionRules. The question is, where

Re: [Lift] bind(): suppress automatic attribute mixin

2010-02-25 Thread TAKEUCHI POMU
use -% instead of -. see this thread. http://groups.google.com/group/liftweb/browse_thread/thread/8fa4e5671fc74765/3894123e29da467b?lnk=gstq=Snippet+attribute+pass+through Pomu 2010/2/26 jasper jasper.raedi...@gmail.com: val xml = t:node attr=some/t:node with val processed = bind(t,xml,

Re: [Lift] The role of LiftRules

2010-02-25 Thread Ross Mellgren
We were talking in another thread about having something kind of similar to this where the configuration is held in lift-util (maybe lift-common) but it is accessible through LiftRules. I think it could be a good idea to do this for this as well, to help guide people to the right place for this

[Lift] Reasoning Behind Box

2010-02-25 Thread Daniel Spiewak
I'm sure this has been discussed before, but I'm curious as to the rationale for the Box ADT. I'm most distressed by the fact that it seems to be masquerading as a drop-in Option replacement, and yet the mathematical properties of the ADT are widely divergent. What's more, the API is very, very

Re: [Lift] Reasoning Behind Box

2010-02-25 Thread Naftoli Gugenheim
I'm assuming you know that it has a third, Failure state, and you're asking about the names. I guess open_! is in keeping with the metaphor of a box (or originally, a can). The _! is Lift's way of saying, Danger! And I guess 'or' is just shorter. (Lift tends to put practicality before academic

Re: [Lift] Reasoning Behind Box

2010-02-25 Thread Heiko Seeberger
Daniel, I would like to look at this question from a solution oriented perspective: Certainly you already noticed the third Box subtype Failure and are aware of its usage. I agree with you, that Option vs Box is confusing for Lift (and nowadays Goat Rodeo) adopters. As Scala and Lift are still

Re: [Lift] Reasoning Behind Box

2010-02-25 Thread Naftoli Gugenheim
Either -- but it's more verbose. I'm not so sure David will want to rewrite the entire lift anyway... - Heiko Seebergerheiko.seeber...@googlemail.com wrote: Daniel, I would like to look at this question from a solution oriented perspective: Certainly you

Re: [Lift] Reasoning Behind Box

2010-02-25 Thread Heiko Seeberger
On 26 February 2010 08:09, Naftoli Gugenheim naftoli...@gmail.com wrote: Either -- but it's more verbose. I'm not so sure David will want to rewrite the entire lift anyway... Right now, I only would like to listen to Daniel, OK? Heiko Company: weiglewilczek.com Blog: heikoseeberger.name