Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
Great info! Noted on the warning, thanks Alexander!
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
The data has been recalculated and new valid data is available.
The data has been invalidated, for example by a user selection. Do not use the data.
Calculation has been aborted.
Calculation has been cancelled.
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);
} );
} );
Hmm, that looks like a mashup example.
Are those events available for extensions?
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
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.
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