Page 2 of 2

Re: Custom Widget empty at runtime

Posted: Fri Apr 07, 2017 4:18 am
by Scott Klement
I was mistaken when I said that "external javascript" would complete before the screen is displayed.

I have reviewed the source code for Profound UI, and the "external javascript" loads at the same time as the widgets are drawn on the display. It cannot be pr4dicted, therefore, whether the external javascript would load before the custom widget is drawn.

However, Profound UI doee wait to execute the "onload" event until the external javascript has completed. So one way to make it work with external javascript is to put code in the "onload" event that makes it re-draw the custom widget.

However, the best solution (as you've already found) is to add your custom javascript code to the start.html file (for Genie) or to put it into a subdirectory beneath your instances profoundui/userdata/custom directory (for the Visual Designer and non-Genie sessions.) This way the widget code is loaded when the session starts, and so will always be available.

Sorry for the confusion.