Actually you could just store a digest of the previous values, and then
compare that with a digest of the new.

-----Original Message-----
From: sean schofield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 17 September 2003 22:57
To: [EMAIL PROTECTED]
Subject: Design Question


I am working on a struts-based web application and I have an interesting
design issue that I'd like to get some feedback on.  I think this problem is
actually quite generic and there must be some good ideas out there already
that I could sponge off!

Basically I have a struts form with a bunch of fields that will be presented
to the user through the usual JSP-based view.  The user will have the
opportunity to makes edits and then submit to an action.  What I would like
to do is be able to identify which fields changed and then take certain
actions based on these changes.

Here is one rough ideas I have so far.  Any thoughts on this plus additional
ideas would be greatly appreciated.

1.) Extend ActionForm and customize the populate method so that it makes a
copy of the old version of the form that is already stored in the session
(since it will have session scope)

2.) Populate new form

3.) Compare two forms and store list of changes in new form

4.) Discard copy of old.

Any thoughts, comments?
TIA,

sean


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


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

Reply via email to