The callbacks object
The next object we are creating is the callbacks
object which will hold all of the methods that need to get updated or changed when another item is updated or changed.
Now, add the callbacks object code to the app.js
file directly after the config
object:
var callbacks = { // Toolbar addClick: function(){ }, removeClick: function(){ }, editClick: function(userId){ }, setToolbarItemStates: function(){ }, // Grid refreshGrid: function(){ }, // Chart refreshChart: function(){ }, // Popup showPopup: function(){ }, hidePopup: function(){ }, // User Data dataChanged: function(){ } }
This object is the glue that holds the data in sync across all of the application components. In each of the following chapters, we will be making additions to this object.