0
def action(Domain domainInstance){

}

If we want to save some events based on the changes in the domainInstance properties, how to get, which properties are updated in the databinding of grails while submitting the form, how to get the old values in-case of that?

CSR
  • 770
  • 1
  • 14
  • 30

1 Answers1

0

You can use getDirtyPropertyNames to get the properties that were modified by the binding. One each such property you could use getPersistentValue to get the actual/persisted value before the binding:

Refer this and this similar answers for details.

Community
  • 1
  • 1
dmahapatro
  • 49,365
  • 7
  • 88
  • 117