on 01-09-2019 12:37 AM
In VSCode the code works fine: in the view I have
<core:HTML content='<div id="chart"></div>'></core:HTML>
where content is written as suggested by https://sapui5.hana.ondemand.com/#/sample/sap.ui.core.sample.Html/code
In corresponding controller I have
onInit: function() {
var oThis = this;
$(oThis.initializeViz);
},
initializeViz: function () {
var oThis = this;
oThis.oAnchor = document.getElementById("chart");
var url = "whatever url";
};
oThis.viz = new tableau.Viz(oThis.oAnchor, url);
}
The problem is that document.getElementById("chart") returns null. However, in VSCode it works fine. Just wondering if i am missing something here or its an Eclipse issue? Thanks for help!
try in onafterrendering
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I forgot to remove }; when copy-pasting parts of my code.
I try to get the div element with id="chart" by doing this: document.getElementById("chart");
And this div element should be accessible because I added a corresponding control to my view: <core:HTML>
BTW, the content property of <core:HTML> has been changed from right syntax (as defined in SAPUI5 SDK Demo) to what you see above when I submitted the question.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergey Kochetkov, what would you like to do?
You code has a lot of syntax error as far as I can see. If you explain us what you want to accomplice we can give you help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.