Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I have a question for those who understand JavaScript and CSS and it's relationship with QlikView...
A client of mine is an OEM partner that has an analytic template that is implemented and customized at multiple end clients. We are exploring a possiblity of automating the customizations to the highest possible degree. Do you have any thoughts and "lessons learned" about hte possibility to tweak the default QlikView output in real time, using JavaScript and/or CSS. For example:
- Remove or hide certain objects on the screen
- Move remaining objects around to close the gaps when certain objects are removed/hidden
- (I know this is getting tricky) Adding objects that may be coming from another QV document or sheet?
Any "real-life" feedback would be very helpful - what's possible? what's not? what's working or not? Is there a noticeable performance hit?
thanks a lot!
Oleg Troyansky
Hi Oleg,
So using document extensions to do what you're saying is definitely possible, especially the first two items you listed. In general, by the time you see a QliKView sheet in the AJAX client it's just a website. Because of that, most of the things you do using javascript and CSS in a regular site are possible here.
You've actually spurred me on to finally put my front end doc extension demo out on community:
http://community.qlik.com/docs/DOC-4243
I've been showing it for a while in my presentations as a sort of fun way to show how much you can mess with the UI from a doc extension. It's not well documented (which is why I never made it available), but the code could offer some insight to how to best approach your situation.
Some highlights/lessons learned:
To address your 3 scenarios directly...
Okay, so that's probably way more than you needed, but I thought it might be helpful to get all those tips out there.
Let me know if you have any more questions.
Hi Oleg,
So using document extensions to do what you're saying is definitely possible, especially the first two items you listed. In general, by the time you see a QliKView sheet in the AJAX client it's just a website. Because of that, most of the things you do using javascript and CSS in a regular site are possible here.
You've actually spurred me on to finally put my front end doc extension demo out on community:
http://community.qlik.com/docs/DOC-4243
I've been showing it for a while in my presentations as a sort of fun way to show how much you can mess with the UI from a doc extension. It's not well documented (which is why I never made it available), but the code could offer some insight to how to best approach your situation.
Some highlights/lessons learned:
To address your 3 scenarios directly...
Okay, so that's probably way more than you needed, but I thought it might be helpful to get all those tips out there.
Let me know if you have any more questions.
Brian, thanks a lot for a very quick and very thourough answer. This is exactly what I was looking for!
Hi
Thanks for this, great post!
I have always had huge problems with extension objects when changing tabs and from my reverse engineering it looks like the complete body is changed between tabs so all my extension objects just disappears (or appears) as of a sudden when the user changes tabs. The script though resides in the head so I can keep track on the JavaScript part.
Have you any ideas/knowledge to spread on what really happens when the user changes tabs?
I would need to get more feedback what happens, eg if a user removes an extension object changes tab or closes the document. I guess you can use the JavaScript document callbacks to some extent but it would be nice to get more info from QlikView what really happens...
Br Patrik
Hi,
I have a same problem with extension object.
I used Jquery-UI accordion , its ok for the first tab, but when i show the rest of tabs,
There are only white containers without any info.
Fortunately, when i right click and chose any actions (like : select ), info appears.
So,in my opinion,It means that when Css or Javascript hide the container of QlikviewObject,
the Server of Qlikview want not to charge info, until u get any action.
Maybe, there is any configuration in Qlikview Server to make sure it buffer out all info when we
load our page?
Best regard.
Hi
To handle this problem, I use two different mechanisms. One that detects if the EO has been initiated before (by checking if there are elements):
function qvPaint(qvSource) {
...
if (qvSource.Element.children.length === 0) {
// First time in document or in tab...
// When tab changes you enter here, but all JS globals are initiated
}
The second I use is to detect if this is the first time the EO is running since document opened. This code is put outside of the qvPaint function (can be coded shorter 😞
if (typeof qvFirstTime === 'undefined') {
// First time EO is running
var qvFirstTime = true;
}
else {
// EO has initited before
qvFirstTime = false;
}
Then you can use this variable to do stuff you need to handle the first time the EO is running.
Br Patrik
Hi xinsheng,
Can you shared your project with JqueryUi - Accordion? I was trying to add the JqueryUi plugin in my project but it doesn't work. Can you help me?
Thank's
Mattia