I would like to identify which form fields(properties) has been changed during form submit in struts.
Here is the situation:
I have a Struts form which has set of fields and this form is used to edit. On submit I would like to know if a particular field say "server IP" field in the form has been changed or not. Is there any predefined of identifying that in struts.
Shriram Gopalakrishnan wrote:Well, I am doing so for other fields but this field change would require an additional step which i want to trigger/execute only when this field changes to avoid the overheads.
OK, if you have some set of fields which you want to look for any value change, then I suggests using "hidden" fields for those desired properties, so that when form gets submitted, in server side, you can compare submitted TEXT FORM field with the original unchanged HIDDEN fields.
Shriram Gopalakrishnan wrote:I am sure struts would have some option to identify whether a particular form field has changed or not during form submit.
Unfortunately, I'm not sure about such FORM utility for Struts.
And this *may* because, on each SUBMIT action, struts creates new instance of Action Form which has NO knowledge of previous Action Form rendered on EDIT page.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com