daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. How to tell if user is submitting a form with changed values, in a Spring MVC-based webapp?
  2. @Override
  3. public int hashCode() {
  4.     return Objects.hashCode(this.field1, this.field2, etc.);
  5. }
  6.    
  7. public static boolean hasFormChanged(Object form1, Object form2) {
  8.     return HashCodeBuilder.reflectionHashCode(form1) != HashCodeBuilder.reflectionHashCode(form2);
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top