if there is a form error then the changes are never applied to the
pojo in the first place. wicket's form workflow is atomic - the model
object is ever updated when all required,type conversion,validation
was successful on all form components in the form. if something failed
wicket will keep the input and display it again when the form is
rerendered.

makes sense?

-igor


On Jan 31, 2008 6:42 PM, Sam Barnum <[EMAIL PROTECTED]> wrote:
> Question on detachable models:
>
> You use detachable models in the contact edit page.  It seems like
> this would cause your changes to be lost if the edit process takes
> more than one request to complete.
>
> If you use the no-arg constructor, the loadableDetachableModel
> creates a new contact at the beginning of every request.  If you
> enter a name that's too long, a validation message is displayed. Then
> the detach() is called on the model, and a new Contact is loaded on
> the next request, erasing your temporary changes.
>
> I may well be misunderstanding something, I'm fairly new to this
> stuff.  It seems that for edit pages you want a non-detachable model,
> which gets serialized to the session.
>
> Thanks for taking the time to write this article, and thanks in
> advance for any clarification on this topic.
>
> --
> Sam Barnum
> 360 Works
> http://www.360works.com
> 415.865.0952
>
>
>
>
> On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote:
>
> > It's finally up:
> > http://www.theserverside.com/news/thread.tss?thread_id=48234
> >
> > Thanks to the various reviewers that helped improve both the
> > content and
> > quality of the article, including Martijn, Eelco, Igor, Gerolf and
> > Talios.
> >
> > --
> > Nick Heudecker
> > Professional Wicket Training & Consulting
> > http://www.systemmobile.com
> >
> > Eventful - Intelligent Event Management
> > http://www.eventfulhq.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to