Properties of the HtmlView Extension Object
The vSphere Client provides the com.vmware.vsphere.client.htmlbridge.HtmlView for creating object views and global views for your HTML-based extensions. You must define the HtmlView object in the plugin.xml manifest file of your HTML view extensions.
The following table describes
the properties that you provide for the
com.vmware.vsphere.client.htmlbridge.HtmlView object class by using
the
<root>
element inside the
<object>
element of your extension definition.
Property | Type | Description |
---|---|---|
<url> | string | The relative URL path starting with your plug-in Web context path to the HTML view. If your HTML-based extension displays external context, use an HTTPS URL to the context. |
<showVCenterSelector> | boolean | The
vCenter Server
selector allows you to switch between all instances that are connected to the
vSphere Client
. If an object view or a global view from your
extension needs to display data for a particular
vCenter Server
instance, include the selector by adding the
<showVCenterSelector> property with value
set to
true . The default value is
false . |
<dialogTitle> | string | The name of the view. The property is applicable only for portlet views that are displayed in a separate dialog box. |
<dialogSize> | integer | The
size of the dialog box of a portlet view which is provided in pixels and the
property value must have the following format:
<width>,<height> . |
<scrollPolicy> | string | Indicates
whether scrollbars are added to the view. You choose between the following
values:
yes ,
no , and
auto . You set
auto as a value to the property to let the Web
browser decide whether scrollbars are needed for your views. The default value
is
no . |
Example HTML-Based Global View Extension
The following example extension definition adds the VM Summary view to the VM workspace.
<extension id="com.vmware.samples.vspherewssdk.vm.summary"> <extendedPoint>vsphere.core.vm.summarySectionViews</extendedPoint> <object> <name>#{summaryView.title}</name> <componentClass className="com.vmware.vsphere.client.htmlbridge.HtmlView"> <object> <root> <url>/vsphere-client/vspherewssdk/resources/vm-summary.html</url> <dialogTitle>WSSDK Summary Sample</dialogTitle> </root> </object> </componentClass> </object> </extension>