The importance of listeners inside the components
We do not want our users to be executing code and making the changes. What we want is to have a way to let the components know that they need to update themselves when a change happens in the dashboard. That's the purpose of the listeners. You could say that a component should be listening for the changes in the parameter(s) that exist in the dashboard. Components have a property called listeners, which you should define as an array. When creating a dashboard, what do you think provides the user with the ability to interact with the dashboard during runtime? The answer is, mostly the listeners.
In the console of your browser, run the following lines:
dashboard.setParameter('marketDashParam', '[Markets].[EMEA]'); var component = dashboard.getComponentByName('top50Customers'); component.update();
The first line of the code is used to change the value of the dashboard parameter, the second is to get the component instance, and the last one is to...