Thanks Martijn, Your implementation is inspiring. I will rewrite mine 
following your example. Merging adds some problems in itself, and some 
more if you want to be smart to the user when some field conflict. There 
even is a problem when no fields conflict because the resulting record 
might not be what the user expected when saving. So it is probably 
necessary to return the actual and modified values in any case if 
versions differ. (ie even if there was no field confict.)

Pierre-Yves

Martijn Dashorst a écrit :
> Just a general comment on this thread, I have added a VersionedForm to
> our application which will discover a stale object based on the
> version number in the object (using javax.persistence @Version
> annotation). I have described this component here:
> 
> http://jroller.com/page/dashorst?entry=wicket_goodie_hibernate_versioned_form 
> 
> 
> (BTW Frank: woogle didn't find this article!)
> 
> If a concurrent update has been detected, the form will repopulate
> with the values from the database. The user should then re enter the
> values (as the previous values were based on old information, the new
> data can invalidate his data!).
> 
> It doesn't do locking across requests, and has served our purpose. It
> may provide you with an alternative.
> 
> Martijn
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to