You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by pa...@firstenergycorp.com on 2003/02/04 21:05:00 UTC
Recognizing that something changed on form
Hello,
I have a system that requires quite a bit of validation when a form is
submitted. What would be nice is for me to be able to tell if something has
actually changed on the form when it's submitted.
Here's what I came up with but I'm wondering if I'm reinventing the wheel.
Does Struts already have something that can do this for me?
I created a class that extends ActionForm and created fields in it that are
common to all my forms. One of the fields I called "formDataChanged". All
the other actionform classes in my system extend this new class.
On all my jsps, I created a hidden field called "formDataChanged". For all
the input fields (text, textInput, checkbox, etc) I set that hidden field's
value to "Y" using the "onChange" property.
Seems to work but not very elegant. Any other suggestions?
Thanks in advance for any input.
David
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org