Hi
I'm trying to get Qbe iframe using SDK
getDocumentHtml is working fine and cockpit is displayed in iframe. So There is no issue with authentication.
getQbeHtml doesn't work
what type of dataset is required in datasetLabel ?
Do you have a working exemple of calling a Qbe from SDK ?
<p><b>TEST: getDocumentHtml</b><p>
<div height="300px" width="800px" id='displayCOCKPIT'></div>
<hr>
<p><b>TEST: getQBEHtml</b><p>
<div height="300px" width="800px" id='displayQBE'></div>
<hr>
<script type="text/javascript">
Sbi.sdk.services.setBaseUrl({
protocol: 'http'
, host: 'localhost'
, port: '8080'
, contextPath: 'knowage'
, controllerPath: 'servlet/AdapterHTTP'
});
var cb = function(result, args, success) {
if(success === true) {
this.execTest();
this.execTest_qbe();
} else {
alert('ERROR: Wrong username or password');
}
};
Sbi.sdk.api.authenticate({
params: {
user: 'biuser'
, password: 'biuser'
}
, callback: {
fn: cb
, scope: this
//, args: {arg1: 'A', arg2: 'B', ...}
}
});
// TEST: getDocumentHtml ----------------------------------------------------
this.execTest = function() {
var html = Sbi.sdk.api.getDocumentHtml({
documentLabel: 'test_cockpit'
, iframe: {
style: 'border: 0px;'
}
});
document.getElementById('displayCOCKPIT').innerHTML = html;
};
// TEST: getQbeHtml ----------------------------------------------------
this.execTest_qbe = function() {
var html = Sbi.sdk.api.getQbeHtml({
datasetLabel: 'qbe_ds'
, iframe: {
style: 'border: 0px;'
}
});
document.getElementById('displayQBE').innerHTML = html;
};