All Places > Content Retirement & Sandbox Private > Ideas > Ideas

Custom events for UI and global event dispatcher

score 140
Voted on 14 times. You have not voted. Active

That's nice that QlikView has triggers and conditional visibility for various objects -- this allows creating interactive analytical apps. However, currently there are two downsides:


A. Need to use throw-away disposable variable just to trigger conditional visibilty of objects


B. Rigid and inflexible triggers




In general -- follow MVC approach more distinctly [1]. Particularly -- introduce custom events, similarly to popular Javascript libraries (e.g. Backbone.js) and make UI objects react on these custom events. Sample workflow of a developer in this case could be as follows:


1. Create custom event "Income_chart:hide" in global application event dispatcher

2. Set up trigger for button B01 to fire "Income_chart:hide" event when clicked

3. Set up chart CH01 to listen to the event "Income_chart:hide" and change visibility to None, when received.

4. Set up table CH01 to listen to the event "Income_chart:hide" and change visibility to Always, when received.


What else could be done with custom events:


  • Trigger not only UI properies change
  • Launch execution of JS/VB scripts
  • Fire other custom (or system) events
  • Make objects and document extensions listen to/trigger custom events
  • Make Alerts to fire custom events as well


[1] Idea of using MVC-pattern in QlikView application is covered in my blog post "Really, is QlikView a BI tool?"


Vote history