[Lift] Re: Rational Behind One Callback per Form Field

2009-07-26 Thread marius d.
Why is that a boiler plate? Usually in those functions you are building your domain objects, calling setters etc when your function bound to the submit button is called, you have your model built up and start processing it. One other reason for those little functions is type-safety. Your

[Lift] Re: Rational Behind One Callback per Form Field

2009-07-26 Thread Naftoli Gugenheim
Doesn't Mapper also have toForm? - marius d.marius.dan...@gmail.com wrote: Why is that a boiler plate? Usually in those functions you are building your domain objects, calling setters etc when your function bound to the submit button is called, you have

[Lift] Re: Rational Behind One Callback per Form Field

2009-07-26 Thread Devon Tucker
Marius, Maybe boiler plate is too strong a word, but every form example I've seen follows the exact same pattern. The form support in Record sounds interesting, though I'm always wary of mixing form handling in with mapped objects. Also, not every form necessarily maps to a database object. I'll

[Lift] Re: Rational Behind One Callback per Form Field

2009-07-26 Thread marius d.
On Jul 26, 5:17 pm, Devon Tucker devonrtuc...@gmail.com wrote: Marius, Maybe boiler plate is too strong a word, but every form example I've seen follows the exact same pattern. The form support in Record sounds interesting, though I'm always wary of mixing form handling in with mapped

[Lift] Re: Rational Behind One Callback per Form Field

2009-07-26 Thread Naftoli Gugenheim
Maybe it would help if I say how lift handles forms. The traditional way is to give each form element a specific human readable name, and then look up the posted parameters by name. This allows one to script posts to the form, which in some cases may allow for a security breach. Also, it means

[Lift] Re: Rational Behind One Callback per Form Field

2009-07-25 Thread Naftoli Gugenheim
I hope to commit in the next few days code that makes a couple of similar asks easier BH. But, to put the ball in your court, how exactly do you want your code to look? If you write a complete sample usage I'll see what I can do to implement such functionality. Also, Kris, could you elaborate