Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alastairmcdonald
Partner - Contributor III
Partner - Contributor III

"Not Connected" popup in Mashup when reopening a closed app

I am working on a mashup that has navigation betwene two separate apps.

I load the first app and render my visualisations as necessary then on the user clicking a navigation button i close the first app and open a second before rendering. this works fine however when i try to navigate back to the first app and reopen the connection i get a not connected pop up.

Weirdly the app does open and all the visualisations are displayed correctly.

I read a post indicating that it could be related to not closing the models that are created when using the app.getObject method

so i tried doing the following when getting the objects:

app.getObject(portal.visualisations,portal.visualisations).then(function(model) {

models.push(model);

});

and before closing the app:

angular.forEach(models, function(value){

value.close();

});

but i still get the "Not Connected" message when reopening the previosuly closed app connection.

Does anyone have any idea what i may have missed?

Message was edited by: Alastair McDonald spelling punctuation and grammmar

14 Replies
alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

I've also tried with and without an idnetity parameter and get the smae thing happening

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

Okay so i have narrowed it down.

 

i followed this post: https://community.qlik.com/t5/Qlik-Sense-Integration/Qlik-Sense-Mashup-Unloading-Objects-from-Memory...

and was able to dispose of objects successfuly however i cannot use this for the CurrentSelections object.

When i add the current selections object back into my code using getObject i get the error.

does anyone know how to do effective cleanup / disposing of the selections bar? generated by getObject?

 

 

ErikWetterberg

Hi,

internally the selections bar is different from the other objects, so it might very well work differently. Why do you need to close it? Why not just keep it, and use the show method if you need it somewhere else. Or just keep it displayed all the time.

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

the problem is i am flipping between multiple QS apps in my mashup and when i return to a previously visited app the selection bar stops working. i had hoped by attempting to close it correctly i could reopen it when revisiting an app a second time.

obviously there is a separate selection bar for each app and i am not trying to pass selections betweeen them simply reload the selection bar each time that corresponds to the app the mashup is based on

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

I solved it thanks to your help Erik,

 

i now have my getter method check for the object and if it exists just use object.show the second time. this seems to work without me needing to close the connection to the app or close the visualisations when navigatiing between apps.

 

Thank you.