Jump to content

JavaScript API - createApplication Issues


Paul Shumaker

Recommended Posts

Hello,

I am currently trying to create an application object and open the document using JavaScript API.

I am able to get a return status of OK but the analysisDocument property is always null. Does anyone know what I'm doing wrong It seems I can access the application and get an onReadyCallback, but I can't actually build the application or get any Documents out of it.

Application.analysisDocument always results as null.

I am using the application loader API (loader.js).

 

 

var app;

var doc;

var rootUrl = 'http://server:8080/spotfire/wp/';

var customizationInfo = new spotfire.webPlayer.Customization();

var apiVersion = '7.5';

var analysisPath = '/Operations/HSE/HSE Insights';

var parameters;

var reloadInstances = true;

var onReadyCallback;

var onCreateLoginElement;

 

$(document).ready(function() {

 

try

{

spotfire.webPlayer.createApplication(

rootUrl,

customizationInfo,

analysisPath,

parameters,

reloadInstances,

apiVersion,

onReadyCallback,

onCreateLoginElement

);

 

function onReadyCallback(result, newApp)

{

app = newApp;

window.alert(result.status);

 

doc = app.openDocument("test");

 

window.alert(app.analysisDocument);

}

}

 

catch(err)

{

window.alert(err.message);

}

 

});

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...