There's more...
Adding fields as an extension is relatively straightforward, but we also need to handle events such as modifiedField and validateField.
If these are overridden on the table, we could use a Pre or Post-event handler. However, these are not always overridden, and these types of event handlers should always be the last choice; these are discussed later in this chapter.
To handle these events, we would subscribe to the appropriate data event. There are two methods for each: a present-continuous (ing) method and a past tense (ed) method.
The ing methods are called before the event fires, and the ed method fires after the event. They only fire on super(); so, if the developer doesn't call super() in the method, the event will not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access