You can create an instance of the standard object view template by using the <templateInstance> XML element in your plugin.xml manifest file.

To create an instance of the standard object view template, you use the <templateInstance> element in your plugin.xml manifest file. Inside the <templateInstance> element, you define the variables that describe the specific instance of the template. The <templateInstance> element can appear anywhere inside the root <plugin> element in the plugin.xml manifest file, but a best practice is to include the template definition with other extension definitions.

You must add the <templateId> element inside the <templateInstance> element. This element contains the identifier of the template you want to create. To use the standard object view template included with the vSphere Web Client SDK, use the vsphere.core.inventory.objectViewTemplate. To use the objectViewTemplate, you must define a namespace variable and an objectType variable.

The namespace variable sets the naming convention for the object workspace extension points. Extension points for a custom object workspace are formed by using the following schema for each data view:

<namespace_value>.<default_extension_point_name>

The following list shows the extension points that you create when you instantiate the standard object view template.

<namespace>.gettingStartedViews - Adds views under the Getting Started tab.

<namespace>.summaryViews - Adds views under the Summary tab.

<namespace>.monitorViews - Add views under the Monitor tab.

<namespace>.monitor.issuesViews - Adds views to the Issues second-level tab of the Monitor tab.

<namespace>.monitor.performanceViews - Adds views to the Performance second-level tab of the Monitor tab.

<namespace>.monitor.performance.overviewViews - Adds views to the Overview performance charts under the Monitor tab.

<namespace>.monitor.performance.advancedViews - Adds views to the Advanced performance charts under the Monitor tab.

<namespace>.monitor.tasksViews - Adds views to the Tasks second-level tab under the Monitor tab.

<namespace>.monitor.eventsViews - Adds views to the Events second-level tab under the Monitor tab.

<namespace>.manageViews - Adds an entry in the table of contents under the Configure tab.

<namespace>.manage.settingsViews - Adds an entry to the Settings node in the table of contents under the Configure tab.

<namespace>.manage.alarmDefinitionsViews - Adds views to the Alarm Definitions entry in the table of contents under the Issues second-level tab of the Monitor tab.

<namespace>.manage.permissionsViews - Adds views to the Permissions tab.

You use the objectType variable to associate the object workspace with your custom entity type. Your custom entity type name should include a namespace prefix, such as your company name, to avoid clashing with other object type names in the vSphere environment. The vSphere Web Client displays the object workspace when the user selects an object of the specified type.

After you create an object workspace by using the standard template, you can create data views at the resulting extension points in the same way that you do for other extension points in the virtual infrastructure. For more information about defining data view extensions, see Properties of the ViewSpec Extension Object.

Top-level tabs, second-level tabs, and views created by using the standard object view template do not appear in the vSphere Web Client main workspace unless you define a data view extension at that extension point. For example, if you do not define a data view extension at the com.vmware.samples.rack.monitor.performanceViews extension point for the Rack object from the following example, the Performance second-level tab under the Monitor tab does not appear for Rack objects.

The following example instantiates the object view template for a new object called Rack. The namespace variable has a value of com.vmware.samples.rack. The vSphere Web Client uses the value to create an extension point for each data view included in the standard object workspace. The extension point for the Monitor tab for the Rack object workspace is named com.vmware.samples.rack.monitorViews. The other extension points in the Rack object workspace are named by using the same convention.

<templateInstance id="com.vmware.samples.rack.viewTemplateInstance">
   <templateId>vsphere.core.inventory.objectViewTemplate</templateId>
   <variable name="namespace" value="com.vmware.samples.rack"/>
   <variable name="objectType" value="samples:Rack"/>
</templateInstance>