Re: validation and #updateModel

2010-07-21 Thread Ray Weidner
I haven't done that before, so I'll have to figure out how to do it. Thanks for the adviceI'll look into doing that, because I have seen this recommendation made to others, so I should probably learn. However, in the meantime, I think I may have a theory as to why this is happening. When

Re: validation and #updateModel

2010-07-21 Thread Ray Weidner
Update: I was able to confirm my theory below. It was specifically MultiFileUploadField's validation of file size via Form#setMaxSize that was causing the problem. Again, I question the value of this method if this is the result. It sounds like you have to put attachment uploading in its own

validation and #updateModel

2010-07-20 Thread Ray Weidner
Hi all, I have what I would think to be a fairly common usecase that I'd like to solve. I have a form with a model that is a LoadableDetachableModel wrapped in a CompoundPropertyModel. I wouldn't expect that to be unusual. However, when a form submit is failing validation for , all changes to

Re: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 1:55 AM, Ray Weidner ray.weidner.develo...@gmail.com wrote: Hi all, I have what I would think to be a fairly common usecase that I'd like to solve. I have a form with a model that is a LoadableDetachableModel wrapped in a CompoundPropertyModel. I wouldn't expect

Re: validation and #updateModel

2010-07-20 Thread Ray Weidner
That would certainly simplify things, but I find it indispensable when it comes to handling persistent entities, which you wouldn't want to serialize with the page. Taking a step back, how can a form map to persistent entities without resorting to LoadableDetachableModels? Not that I'm

Re: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 2:19 AM, Ray Weidner ray.weidner.develo...@gmail.com wrote: That would certainly simplify things, but I find it indispensable when it comes to handling persistent entities, which you wouldn't want to serialize with the page. Taking a step back, how can a form map to

Re: validation and #updateModel

2010-07-20 Thread Igor Vaynberg
On Tue, Jul 20, 2010 at 12:53 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically, I use LDM's for every place that I am viewing data, and a regular serializable model for places that I'm editing data.  You must be able to persist changes across requests (without persisting to the

Re: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 10:20 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: On Tue, Jul 20, 2010 at 12:53 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically, I use LDM's for every place that I am viewing data, and a regular serializable model for places that I'm editing

Re: validation and #updateModel

2010-07-20 Thread Ray Weidner
Back to the original question, when you say all changes to the form are lost - do you mean that the form rerenders with absolutely no values filled out? Only the fields that failed conversion or validation should be blank. See, that throws me off, too. Yes, the supposedly valid fields are

Re: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 1:22 PM, Ray Weidner ray.weidner.develo...@gmail.com wrote: Back to the original question, when you say all changes to the form are lost - do you mean that the form rerenders with absolutely no values filled out? Only the fields that failed conversion or