On Tue, Jul 20, 2010 at 10:20 AM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote:
> 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 long-term > > storage), which means that you'll need to be able to serialize things. > > this is not true :) the formcomponents themselves preserve the state > so using an LDM for a form is feasible. the sequence is basically > > * load entity - model > * call setters - form component models > * flush/close session - somewhere > Right, which is why I said in the second paragraph: 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 > In the first paragraph I should have been more clear - I use serializable models for where I'm editing data and passing it to other pages (i.e. multi-step wizards). But, in this case, he seems to be in a single form, so the components should still have state unless he's reinitializing them somehow (redirecting to new page, etc). -- Jeremy Thomerson http://www.wickettraining.com