basic idea is: when creating an edit page load the object from database and set it as form model. when the form is submitted - the loaded object becomes detached because its session was closed when the prev request was done. let the form bean the changes. call the service validate method - if everything is OK - call the service merge method which uses session.merge to save the changes.
checkout wicket-phonebook - it also works like that bar the validation.
-Igor
On 11/2/05, Phil Kulak <[EMAIL PROTECTED]> wrote:
I know we've talked about this before, but now I need to do it and I
have no clue. The easiest thing, of course, would be to just let the
models get updated, do my validation, and report any errors back to
the user. The problem is that if I let the models get changed, then
Hibernate get's all excited and automatically updates the database at
the end of the request. Has anyone hit this problem before?
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
