I'm not sure I fully understand the problem. I thought the form contained
all the data so all you needed was a new object to populate.

If not, Kalle's suggestion of saving temp state to the db sounds OK to me.
Perhaps with a scheduled task to clear out incomplete wizards after some
period of inactivity. Good for marketing situations where you can send an
email suggesting users complete the wizard.

If you want to maintain a stateless wizard, you could use a ValueEncoder
which puts all values in the encoded clientside string (eg json or
similar).
On 24 Oct 2014 17:27, "George Christman" <gchrist...@cardaddy.com> wrote:

> Lance, even if I were to give the object a temp id or put it in a wrapper
> object, wouldn't that value be lost as soon as the zone finishes rendering?
> It seems to me as if I have three choices, session, commit, or copy form
> data from form a to b. Your thoughts?
>
> On Fri, Oct 24, 2014 at 12:02 PM, Lance Java <lance.j...@googlemail.com>
> wrote:
>
> > Instead of null ids, you could give your unsaved entities unique ids that
> > are negative. This would require a smart enough ValueEncoder that would
> NOT
> > attempt to lookup negative ids from the database.
> >
> > It's all sounding a bit hack so you might prefer to pass around a wrapper
> > object which knows if the object has been persisted yet or not. Perhaps
> an
> > entity that has been persisted might encode as "P:123" and a new entity
> not
> > yet persisted would encode as "N:123".
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>

Reply via email to