Yeah, those models are typically perfect for doing database stuff. The
only thing is that if all validations pass, you should update the
database. But that's usually exactly what you want, right? If
validation fails, the model is indeed reloaded from the database, but
that's not something that is in the user's way as for components for
which the validation failed, the input values of last request will be
displayed instead of the current model values.

Eelco


On 7/31/06, Nick Heudecker <[EMAIL PROTECTED]> wrote:
> Is it possible to use a LoadableDetachableModel with a Form?  The problem
> I'm running into is the following:
>
> 1) Create the Form with: new Form("form", new CompoundPropertyModel(new
> MyDetachableModel(fooId, fooService)));
> 2) Present the page to the user for editing.  The user edits the fields and
> submits the form.
> 3) The model object is reloaded from the database/cache, wiping out what the
> user entered.
>
> Is there any way around clobbering the user input?  It doesn't look like it
> since the LoadableDetachableModel is doing exactly what it's supposed to,
> but I want to make sure I'm not missing something.
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to