Child pages
  • Table Events

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Servoy provides an event model at the data layer, giving developers the opportunity to implement validation and execute business logic just before and after data changes are committed to the database. There are twelve Table Events, each of which may be bound to an entity or a global methodsmethod.

The first three events occur just prior to the change being committed to the database. Moreover, the event handler has the opportunity to veto the event, preventing the change from being committed. This is and ideal location to implement fail-safe data rules.

...

An onRecordXXX event is bound to an entity or a global method, which is invoked when the event occurs. The record that is modified is passed in as an argument and the method can veto the change by returning false or throwing an exception.

...

An afterRecordXXX event is bound to an entity or a global method, which is invoked when the event occurs.

...

An onFoundSetXXX event is bound to an entity or a global method, which is invoked when the event occurs. The method can veto the change by returning false or throwing an exception.

...

An afterFoundSetXXX event is bound to an entity or a global method, which is invoked when the event occurs.

...