Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
bryan_sng
New Contributor III

Qlik Sense Extension Events

Hello guys, is there a document on what events are supported in qlik sense extension?

So far I manage to understand the following events are available via:

Playing with Extensions in Sense

onStateChanged

suppressOnPaint

prePaint

updateData

paint

resize

Tags (3)
1 Solution

Accepted Solutions
Employee
Employee

Re: Qlik Sense Extension Events

So the events that are documented and thus also supported are paint and resize.


However if you console.log out this in your paint function and look at the prototypes you will see the different methods that are available. Now these might change in the future, just as a word of warning.

proto.PNG

7 Replies
Employee
Employee

Re: Qlik Sense Extension Events

So the events that are documented and thus also supported are paint and resize.


However if you console.log out this in your paint function and look at the prototypes you will see the different methods that are available. Now these might change in the future, just as a word of warning.

proto.PNG

bryan_sng
New Contributor III

Re: Qlik Sense Extension Events

Great info! Noted on the warning, thanks Alexander!

Employee
Employee

Re: Qlik Sense Extension Events

Just a side note:

Starting with Qlik Sense 2.0 we will have some events included in the documentation.But those events actually already start before Qlik Sense 2.0, so should work also in Qlik Sense 1.0 and 1.1

Validated

The data has been recalculated and new valid data is available.

Invalidated

The data has been invalidated, for example by a user selection. Do not use the data.

Aborted

Calculation has been aborted.

Cancelled

Calculation has been cancelled.

Closed

Connection to the Qlik engine has been closed for this object.

Example:

function setTitle ( model, elemid ) {

  //have we got a title??

  if ( model.layout.title ) {

  //set the text of all links to this element to the title

  $( 'a[href="#' + elemid + '"]' ).html( model.layout.title );

  }

}

app.getObject( elementid, id).then( function ( model ) {

  //set the title

  setTitle( model, elementid);

  //bind to validated event

  model.Validated.bind( function () {

  //will be triggered when there is new data

  setTitle( this, elementid);

  } );

} );

Employee
Employee

Re: Qlik Sense Extension Events

Hmm, that looks like a mashup example.
Are those events available for extensions?

Employee
Employee

Re: Qlik Sense Extension Events

Hi Alex,

I have created an example how to consume these events in visualization extensions. Will also add this to our documentation backlog that we add this to the official documentation:

https://github.com/stefanwalther/qsExtensionPlayground/tree/master/Angular-Events

Regards

Stefan

Employee
Employee

Re: Qlik Sense Extension Events

So they are angular only?

Or could you hook into them through,

define([], function() {

return {

initialprops: {},

Validated: function() {},

resize: function() {},

paint: function () {}

}

});

Alexander Karlsson

Developer Relations Engineer

Mobile: +1 215-713-7750

Skype: qlikander

Email: Alexander.Karlsson@qlik.com

Qlik

150 N. Radnor Chester Road

Suite E-120

Radnor Pennsylvania 19087

qlik.com<http://www.qlik.com/>

<http://www.qlik.com/us/explore/products/sense/desktop?SourceID1=Corporate_Email_Signature>

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

erik_wetterberg
Honored Contributor

Re: Qlik Sense Extension Events

Hi,

No they are not angular only, but in a non-angular extension you find the model, where they are, in another way. It is under backendApi. So you could find them like this:

this.backendApi.model.Validated.bind(function(){

// add your logic here

});

Though this would be when paint function is called..

Erik

Erik Wetterberg
https://extendingqlik.upper88.com/