Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

Correct method to get built-in object icon resources?

$
0
0

What is the correct way to get and display an icon for a built-in object (e.g. for HostSystem, Datastore, etc.)?

 

By tracing the standard UI, I can retrieve the "primaryIconId" property from either my own objects or the VMWare-provided ones (HostSystem, Datastore). This returns a string, e.g. "vsphere-icon-datastore". However, passing this into ns.getString() just returns the same text, with "Resource key not found" output to the console. Trying "WEB_PLATFORM.getString("vsphere-icon", "datastore") returns "datastore" with "Bundle not found" on the console.

 

I found using WEB_PLATFORM.getString("commonImages", "datastore") - but this returns a 24x24 PNG graphic that isn't used in either the HTML or Flex UIs.

 

Is there a proper Javascript API call and/or example method to get the correct icon that will be consistent with the rest of the VMWare-provided UI?


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>