|
From: Daniel M. <mi...@pa...> - 2004-05-12 03:17:56
|
Hi Seth, > Please point out my error(s) here if I have made one or many. > > One potential solution (inspired by above mentioned post): > Create a RequestWrapper that can be validated just like the persistent > object to which the request will be bound (I realize this could be messy > because it is essentially reverse reflection aka emulation). Then invoke the > validator substituting the wrapped request for the actual object _before_ > binding. >Great thinking, Daniel. I've always used a Command/FormBean because often the web workflow doesn't match up to the domain objects close enough. But you're right, I wouldn't want any flush() to happen until after validation. >For this scenario to happen, a call to find() or iterate() would have to be called /on the session for this request/, correct? Assuming a usual setup of one session for the request, and the request itself is not multithreaded, how would this condition arise? After validation failure: processFormSubmission() -> showForm() -> referenceData() which could load objects from the database using a find() or iterate(). Thanks for the quick feedback. Daniel ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |