Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
bryan_sng
Partner - Creator
Partner - Creator

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

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

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

View solution in original post

7 Replies
Alexander_Thor
Employee
Employee

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
Partner - Creator
Partner - Creator
Author

Great info! Noted on the warning, thanks Alexander!

Stefan_Walther
Employee
Employee

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);

  } );

} );

Alexander_Thor
Employee
Employee

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

Stefan_Walther
Employee
Employee

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

Alexander_Thor
Employee
Employee

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.

ErikWetterberg

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