[Lift] Re: Passing functions as arguments

2008-10-18 Thread Tim Perrett
Just been nooding this somemore, and one thing I cant seem to figure is why / how this is better than supplying a list of custom subclasses that implement a supplied abstract class? Just been having a play with some ideas, and how does your suggestion improve upon something like this: https://gi

[Lift] Re: Stand alone download

2008-10-18 Thread Dorinel
> > Its never really an issue for us as were all connected to the net. Can > > I ask why you cant connect that machine to the net? > > A fair number of secure organizations (corporate, government, etc.) may > opt to not have direct Internet connections.  It's not that uncommon. Yes, it's true.

[Lift] Re: Passing functions as arguments

2008-10-18 Thread Tim Perrett
lol - sorry that was lame answering my own question but I just figured it out. If I go with something like: https://gist.github.com/9df3baee3793b750e42e then it can be truley arbitrary code; comparatively a subclass could never the as flexible. Pretty neat. Now my IPN code will operate a little

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Charles F. Munat
I like this idea a lot. And it seems Derek does, too. This will also work well as practice for a multi-page survey form I have to build later this month. Thanks. Chas. Viktor Klang wrote: > Chas, > > this like that takes quite some forethought before implementing. > (holding on to entity in

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Charles F. Munat
I have a subscription to O'Reilly's Safari bookshelf. I'll look for it there. I've been reading Manning's EJB3 in Action and O'Reilly's Harnessing Hibernate online. It's a pain reading online, but I'm already shelling out almost $50/month for the service... Thanks for the recommendation. Unde

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Charles F. Munat
Oh! I thought you were just suggesting a method in the earlier email -- I didn't realize that you'd actually done it already. Damn, you're fast. I'll check out the new code. This looks great. And I like the method -- saving intermediate steps and then purging them later if they're never comple

[Lift] Re: Passing functions as arguments

2008-10-18 Thread Tim Perrett
Hey Marius, Ok, so i've been putting this together, and have the following: case class PaypalEventAction(status: PaypalTransactionStatus, functions: List[() => PaypalActionHandler]) So, when I then create a subclass for PaypalActionHandler which I create a new instance of like: case class Seco

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Derek Chen-Becker
Well, I've already checked in the code for keeping the object in the continuation instead of the ID on the wip-dc-jpa-jta branch of liftweb. I thought we had discussed this in a previous email. To get the object instead of the Id you just grab a val on the object and re-inject it with a hidden elem

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Tim Perrett
Hey Chas, Can I suggest this book: http://www.amazon.com/Hibernate-Made-Easy-Persistence-Annotations/dp/0615201954 It sounds to me that you need to understand the magic of the entity manager and how that can be utilized. I read this book a little while ago and must say it was an eye opener. Don

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Viktor Klang
Chas, this like that takes quite some forethought before implementing. (holding on to entity in either transient, detached or persistent state. And then you have the problem that if you try to save the transient entity, and it fails, it still gets allocated an identifier, and then you have a trans