VMware {code} Community
rathi27akash
Enthusiast
Enthusiast

Gloabal Refresh on Global View in HTML Bridge

Hi, 

We are using HTML Bridge to develop a plugin.

Our plugin has a Global view, where we ask user to enter certain settings. If settings are save successfully we want to perform Global Refresh. on going through HTML-Bridge Docs i found that WEB_PLATFORM.onGlobalRefreshRequest needs to be assigned to some local refresh function but, i didn't found how invoke click of GlobalRefreshButton from java script.

 

 

Thanks in Adavnce,

Rathi.

Rathi.
Reply
0 Kudos
4 Replies
rathi27akash
Enthusiast
Enthusiast

Hi laurentsd,

can you please help with this issue.

 

Thanks in adavance,

Rathi.

Rathi.
Reply
0 Kudos
laurentsd
VMware Employee
VMware Employee

See the 6.0.1 release notes:

  • The WEB_PLATFORM.onGlobalRefreshRequest API was replaced by WEB_PLATFORM.setGlobalRefreshHandler to make global refresh work correctly in HTML views. (onGlobalRefreshRequest is still supported but not recommended!). See the chassisA sample's' chassis-summary.js for an example using setGlobalRefreshHandler.
Reply
0 Kudos
rathi27akash
Enthusiast
Enthusiast

hi laurentsd,

Thanks for the quick reply. We are using 5.5.3 and for it i guess, WEB_PLATFORM.onGlobalRefreshRequest is provided. using WEB_PLATFORM.onGlobalRefreshRequest, we will be able to set what will happen if we click on Global Refresh, BUT I want to make a global refresh from my java-script. I want to refresh main workspace as well as left-hand side navigation panel (example count of chassis and rack, when some settings are saved).

Rathi.
Reply
0 Kudos
laurentsd
VMware Employee
VMware Employee

It is not possible to force a global refresh from Javascript.  Inventory count in the left-hand side are refreshed as the result of objects added, deleted or modified.  This is done through the HTML bridge Actions API.  See the part of the doc where it says:

  • When the action adds, deletes or updates objects you should notify the framework of this change in order to update the objects list automatically. You can use the ActionResult methodssetObjectAddedResult, setObjectDeletedResult and setObjectChangedResult.
Reply
0 Kudos