[Lift] Re: JPA many-to-many deletion

2008-09-29 Thread Derek Chen-Becker
One other thing to note is that Model.merge actually creates a managed copy of whatever it merges. The original object you pass to it is left completely unchanged. So if you do def doSomething(student : Student) = { Model.merge(student) student.courses.add(...) student.balance += 100 }

[Lift] Re: HTTP Client?

2008-09-29 Thread David Pollak
On Fri, Sep 26, 2008 at 3:50 PM, Marc Boschma [EMAIL PROTECTED][EMAIL PROTECTED] wrote: Given Lift's focus on security I envisioned that the POST URL would contain a random element, to reduce the threat of fake PayPal interactions. It is a small risk, but then it is the small risks that

[Lift] Re: HTTP Client?

2008-09-29 Thread Tim Perrett
Hey David, What do you think of my suggestion about creating something similar to ajax_request? I havent put any time into this yet as I wasnt sure if it was a good idea or not. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are

[Lift] Re: lift:surround and multiple templates

2008-09-29 Thread David Pollak
On Fri, Sep 26, 2008 at 2:50 PM, Charles F. Munat [EMAIL PROTECTED] wrote: Done. http://liftweb.net/index.php/LiftTags#surround Thank you very much! Chas. Mateusz Fiołka wrote: I also lost half a day with this error. Is this rule at least documented anywhere? Regards,

[Lift] Re: Weird RequestVar behavior (or something else?)

2008-09-29 Thread David Pollak
Kris, If your goal is to have some cleanup function added at the end of the request, you can do the following: trait Cleanable {def cleanup: Unit} class MyStuff { var needsCleanup: Can[Cleanable] = Empty S.addCleanupFunc(() = needsCleanup.foreach(_.cleanup)) } So, in the above code, if

[Lift] Re: Image Submit Buttons fail to Submit (in IE)

2008-09-29 Thread Marius
Hi, The point of this would not be a recommended cross browser artifact but in a sense a way to deal with situations like mobile phone version of a site witch sometimes needs be very simple comparing with PC browsers. In such situations such fragile approach would be quite handy (as I hit some

[Lift] Re: Image Submit Buttons fail to Submit (in IE)

2008-09-29 Thread David Pollak
In the case of large swaths of a site being different, I'd opt for URL re-writing to send the WAP device to a parallel set of URLs. On Mon, Sep 29, 2008 at 1:32 PM, Marius [EMAIL PROTECTED] wrote: Hi, The point of this would not be a recommended cross browser artifact but in a sense a way

[Lift] Re: Weird RequestVar behavior (or something else?)

2008-09-29 Thread David Pollak
Kris, I'd do something like: object MyTransactionThingy extends LoanWrapper { private val transactions = new ThreadGlobal[Map[String, Transaction]] def apply[T](f: = T): T = { transactions.doWith(Map.empty){ val ret = f transactions.value.values.foreach(_.cleanup) }

[Lift] Re: HTTP Client?

2008-09-29 Thread David Pollak
On Mon, Sep 29, 2008 at 3:52 PM, Tim Perrett [EMAIL PROTECTED] wrote: Hmmm... I may be misunderstanding what you're saying... but... In the PayPal landing, I'd update the user's state (e.g., credit their account), add something to S.notices and then redirect the browser to either / or

[Lift] Re: HTTP Client?

2008-09-29 Thread Tim Perrett
Okay... my mistake.  Yes, you have to set this up in Boot with a DispatchPf to handle the incoming request. Thats what I thought - this is why I was asking about ajax_request :-) Do my previous ramblings make any more sense now? Cheers Tim