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 persistent
> entities without resorting to LoadableDetachableModels?
> Not that I'm necessarily in a position to perform such a drastic
> refactoring
> at this stage in my project (I'm not).  I'm just curious.
> But if anyone has an answer to my first problem, I'm still quite
> interested.
>  Because I can't really replace LoadableDetachableModels at this stage of
> development.

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 long-term
storage), which means that you'll need to be able to serialize things.

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.
 Others should have their data still in them in an unconverted form even
though the converted / validated form has not been pushed to the model yet.
 If all the fields are truly blank, is it possible that you're somehow
reinitializing those fields?  Perhaps redirecting on error to a new instance
of the page?

Jeremy Thomerson

Reply via email to