Re: Ajax Buttons and Form

2009-06-08 Thread Warren Bell
Add the Model to the form and override IModel#getObject() return updated new "Post" object. I read on this mailing list not to set Models. An example with a LoadableDetachableModel. Form blogPostForm = new Form(id, new CompoundPropertyModel(new LoadableDetachableModel()

Ajax Buttons and Form

2009-06-07 Thread Luther Baker
I'm saving a 'Post', like a blog post, and JPA's merge function doesn't update the object in place but rather, returns an object reflecting the new database fields (like "id" if it were set). In my application, I'd like to manage insert / update by setting this new 'Post' as the model for my form.