Hello,
I have spent the last day toying with different methods of making asynchronous loads of the widgets when the page first loads. After researching these forums, I saw a similar topic that lead me to check out the RSS widget in the demo. I saw that in the demo, it was using a Timer. So, I created a timer on my widget and the load function is called from that timer (it calls a web service to get data to fill a chart). It appears to be working correctly and only executing once (I disable it right away and gave it an interval of 1).
What I am noticing is that when this widget loads the first time(6 seconds), it is blocking the other widgets from loading (even though those widgets also have a timer). I notice that when I put the 6 second widget before the 1 second widgets, it takes 6 seconds before the timer starts on the 1 second widgets. If I reverse the order on the screen, I seem to get the 1 second widgets to load first, then the 6 second widget loads (which looks better). So a few questions:
1) If you have several widgets on your page (each with their own timers and each calling a .NET web service), should they all be able to load at the same time on the page when it first starts up? Or, does one have to load before another? The RSS example is helpful, but that is the only widget that appears to take a bit to load.
2) Is there a load priority that is customizable? In other words, can I assign a value to the 6 second widget so that no matter where it appears on the screen, it will never get loaded first over a widget that takes 1 second to load?
Thanks in advance for all your help!