Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multipage Mashup - keep selections between html pages?

Hi!

We have received a nice mashup that contains of multiple .html-Pages. See here: http://demo.heldendaten.net:8080/extensions/Vertriebsdemo_Sense_Mashup/Produkte.html

Unfortunately, if a user does selections on one .html-Page (for example Produkt.html), these selections are lost when the user changes to another html page.

From what I see in the .js code, the Mashup always calls the following  code on every new page. See below.

--> to me it seems that calling openApp on every page, opens a new connection to the document --> old selections are lost.

--> I have read through the mashup API, but haven't really found anything to keep the app-session alive between multiple pages. I have played wit the "identity" property of the app config, but no success (running Qlik Sense 2.0.3)

--> has anyone a short example how I can fix the existing code?

var config = {
     host: window.location.hostname,
     prefix: "/",
     port: window.location.port,
     isSecure: window.location.protocol === "https:"
  //,
  //identity: "12349876"
};
require.config( {
     baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port: "") + config.prefix + "resources"
} );

require( ["js/qlik"], function ( qlik ) {
     qlik.setOnError( function ( error ) {
          alert( error.message );
     } );

     //callbacks -- inserted here --
  
     //open apps -- inserted here --
  
  
      app = qlik.openApp("871f98c2-38cd-46b1-9676-6dd3e87f06be", config);

     
  
     //get objects -- inserted here --
  
       $(".qvobject").each(function() {
          var qvid = $(this).data("qvid");
          app.getObject(this, qvid);
     });

29 Replies
jim_chan
Specialist
Specialist

Hi Alexander,

akl‌ would need your help to take a look on my issue.

Not applicable
Author

Hello, did you find an issue, i have probabely the same problem.

stevenkoppens
Partner - Contributor III
Partner - Contributor III

Hi Guys,

I've exactly got the same problem. I've also tried to create a ID for each user and save it in a cookie, but without luck.

Hoped it was fixed in Sense 3.0, but still running into the same issue.

I've used the following code to create the ID and save it in a cookie:

function myFunction(name) {

  var value = "; " + document.cookie;

  var parts = value.split("; " + name + "=");

  if (parts.length == 2) { return parts.pop().split(";").shift();

  }  }

  $(document).ready(function(){

    

  if( SessionID == undefined)

  {   var uniq = 'id' + (new Date()).getTime();

   document.cookie = "ID="+uniq;  }

});

var SessionID = myFunction('ID');

 

var config = {

  host: window.location.hostname,

  prefix: "/",

  port: window.location.port,

  isSecure: window.location.protocol === "https:",

  identity : SessionID

  };

stevenkoppens
Partner - Contributor III
Partner - Contributor III

Any updates on this topic???

Aiham_Azmeh
Employee
Employee

Hi Steven,

It's under investigation, a bug have been filled regarding this issue. I will try to keep everyone updated.

regards

Anonymous
Not applicable
Author

There are several sheets in my Qlik Sense Desktop App.

I need put all the Qlik Sense sheets to Qlik mashup in different pages, which is just as your Qlik mashup demo.

Could you please tell me how to create multi-pages mashup in Qlik Sense?

I also have a button to navigate among different Qlik Sense sheets at Qlik Sense Desktop. How could I still navigate between different mashup pages? It is better to still use the same button extension.

Any suggestion is appreciated!

stevenkoppens
Partner - Contributor III
Partner - Contributor III

The simplest way to do this is to create multiple HTML pages and link them using something like an navigation bar, which are basically buttons with links to the other pages.

The extension you are taking about won't be much help to you I think. If you're not familiar with linking multiple HTML pages I would suggest to do some online courses on Web languages, like these https://www.codecademy.com/learn/web.

Good luck,

Steven

Op 24 jul. 2016 om 07:19 heeft datalakeyu <qcwebmaster@qlikview.com<mailto:qcwebmaster@qlikview.com>> het volgende geschreven:

Aiham_Azmeh
Employee
Employee

Hi datalakeyu‌,

An angular based multipage mashup can be found here: GitHub - erikwett/helpdesk-angular: Qlik Sense mashup example using AngularJS

The routing part of it is straight forward: helpdesk-angular/helpdesk-angular.js at master · erikwett/helpdesk-angular · GitHub

I hope this helps

Not applicable
Author

Hi Aiham,

Does this angular based mashup support keeping selections over multiple pages? In other words, would this be a resolution for the bug you are referring to?

Aiham_Azmeh
Employee
Employee

Yes, it uses the angular routing  (AngularJS $route) which, like any other modern web application, will not make a full refresh of the page; this way the websocket connection is never closed and the selections are kept between pages.

regards,