A good way to pass data round your system is with
Value Objects. (Objects that hold the data as
properties but have no processing methods). Much is
written about these on this list & many other places.
In your Value Objects implement the standard java
Clonable & Compareable interfaces so you can do:-
XxxxValueObject originalData = currentData.clone();
----get data from form
--- then:-
if (originalData.equals(currentData)) {
hope tha helps
keith.
--- "Hudayioglu, Fehmi"
<[EMAIL PROTECTED]> wrote:
> Again hi guys,
>
> lets say that I want to compare these values in the
> action bean. Is it
> possible to use the form bean that stores our old
> data, and the form that is
> populated by the new data for comparison? I hope i
> am not confusing.
>
> thanks again.
>
> -----Urspr�ngliche Nachricht-----
> Von: Keith Bacon [mailto:[EMAIL PROTECTED]]
> Gesendet am: Friday, December 14, 2001 3:00 PM
> An: Struts Users Mailing List
> Betreff: Re: possible to keep old and new values
> inside of a form bean
>
> Hi Fehmi.
> I think you should do things like this in your
> Action
> class rather than the Form bean - which should
> strictly be used for data that goes from forms to
> Action class & vice versa.
> This is part of your business logic (or maybe of DB
> integrity checking) - so if your system is
> large(ish)
> you'll want to have that logic in classes called
> from
> your Action class.
> Keith.
>
>
>
> --- "Hudayioglu, Fehmi"
> <[EMAIL PROTECTED]> wrote:
> > Hi folks,
> >
> > I am sending two values to form bean and then user
> > have the privilege to
> > change these two values. To restore the database I
> > must also store the old
> > values that I have conveyed to screen from the
> > formbean but as the user
> > alters the data my old values are vanished. What
> > will be the effective
> > solution to store the old values in the form bean
> > while also retrieving the
> > new values for comparing and sending the changed
> > ones to the servlet.
> >
> > Cheers,
> > Fehmi.
> >
> > --
> > To unsubscribe, e-mail:
> >
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for
> all of
> your unique holiday gifts! Buy at
> http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>