I am unable to get the global refresh handler in my HTML Bridge plugin to be invoked when clicking on the vSphere web client global refresh button.
On my setup, I verified the JS files are loaded, WEB_PLATFORM is an actual object with the HTML Bridge APIs, and the jQuery document.ready function is being invoked with the resulting initial refreshData() call. However, clicking on the vSphere web client global refresh button does not invoke the refreshData() function in my HTML Bridge plugin that is loaded in the HTML Bridge IFrame window on top of the Flex vSphere client.
This is a snippet showing the relevant code modified from the chassisA HTML Bridge sample app:
...
<script src="/vsphere-client/chassis-test/assets/jquery-1.10.2.min.js"></script>
<script src="/vsphere-client/chassis-test/resources/js/web-platform.js"></script>
<script type="text/javascript">
$(document).ready(function() {
function refreshData() {
console.log("refreshData() called");
}
// Do the actual call now and save as GlobalRefresh handler
refreshData();
WEB_PLATFORM.onGlobalRefreshRequest = refreshData;
});
</script>
....
Questions:
1) Does this require vSphere web client version 5.5.1 or later? Although the web SDK docs specify the minimum client version is 5.5.1, I am currently running on vSphere client version 5.5.0 and making calls using the WEB_PLATFORM.getObjectId() and other APIs without any problems. This is the only web platform API that I am aware of that is not functioning as expected in my environment. Is this problem actually due to something missing in client version 5.5.0?
2) Does the WEB_PLATFORM.onGlobalRefreshRequest API require any Java services to be present in my plugin, or should the snippet above work as-is with just the client code above? I assume internally an ExternalInterface call is being made from the vSphere client Flex code when the user clicks on the web client global refresh button, and thus its functionality should only depend on WEB_PLATFORM.onGlobalRefreshRequest being assigned a valid JavaScript function.
Thanks.