You extend an object list view by creating an <extension> element in your plugin.xml file. The extension point you specify depends on whether you extend a vSphere object or create a new object type.

The vSphere Web Client provides an extension point for the list view for each type of vSphere object. The extension point names follow the format vsphere.core.<objectType>.list.columns, where the objectType placeholder corresponds to the type of vSphere object. For a list of extension points, see List of Extension Points.

The following example shows part of an extension definition for an extension that adds a column to the virtual machine object list view. The column shows the name of the host object related to a virtual machine object.

The <object> element type attribute specifies the column or columns to add to the target object list view. The properties referenced in the <requestedProperties> elements are requested by the platform, with no UI code involved. On the Virgo application server, the Data Access Manager retrieves the requested property for you and returns it to the client.

<!-- Define the host name column for the vm object list view -->
<extension id="com.mySolution.myPlugin.vm.columns">
   <extendedPoint>vsphere.core.vm.list.columns</extendedPoint>
   <object>
      <items>
         ...
         <!-- Host name column -->
         <com.vmware.ui.lists.ColumnContainer>
            <uid>com.mySolution.myPlugin.vm.column.hostame</uid>
            <dataInfo>
               <com.vmware.ui.lists.ColumnDataSourceInfo>
                  <headerText>#{hostName}</headerText>
                  <!-- Object property whose text value will be displayed (1-element array) -->
                  <requestedProperties>
                     <String>n{['hostName']}</String>
                  </requestedProperties>
                  <sortProperty>hostName</sortProperty>
                  <exportProperty>hostName</exportProperty>
               </com.vmware.ui.lists.ColumnDataSourceInfo>
            </dataInfo>
         </com.vmware.ui.lists.ColumnContainer>
         ...
</extension>

If you added a new object type to the vSphere environment, and you used the standard object view template to create an object workspace for that object, that object workspace contains a list view. For more information on the object view template, see Extending the vCenter Object Workspaces.

You can extend a custom object list view in the same way as you extend the pre-existing list views in the vSphere Web Client. In your extension definition, you must specify the list extension point created by the custom object template namespace. The format for a custom object list extension point is typically <namespace>.list.columns. For example, the list extension point for a custom object called Chassis might appear as myExtension.core.Chassis.list.columns, where the template namespace is myExtension.core.Chassis.

The following code snippet shows an extension definition for an extension that adds a Chassis object list view. The list view shows the name of a custom Chassis object, in addition to any other properties specified inside ColumnContainer elements.

The <object> element type attribute specifies the column or columns in the target object list view. The properties referenced in the <requestedProperties> elements are requested by the platform, with no UI code involved. On the Virgo application server, you need to implement a Data Service Adapter to retrieve data and return it to the client.

<!-- Define the chassis list columns -->
<extension id="com.vmware.samples.chassis.list.sampleColumns">
   <extendedPoint>com.vmware.samples.chassis.list.columns</extendedPoint>
   <object>
      <items>
         <!-- Chassis name column -->
         <com.vmware.ui.lists.ColumnContainer>
            <uid>com.vmware.samples.chassis.column.name</uid>
            <dataInfo>
               <com.vmware.ui.lists.ColumnDataSourceInfo>
                  <headerText>#{name}</headerText>
                  <!-- Object property whose text value will be displayed (1-element array) -->
                  <requestedProperties>
                     <String>name</String>
                  </requestedProperties>
                  <sortProperty>name</sortProperty>
                  <exportProperty>name</exportProperty>
               </com.vmware.ui.lists.ColumnDataSourceInfo>
            </dataInfo>
         </com.vmware.ui.lists.ColumnContainer>
         ...
</extension>

When you extend a list view with a new column, your users will not see the new column when they first install your plug-in. To see the extension, each user must select the new column to appear in the vSphere Web Client list view. The column selection is saved in the user preferences so that the column will be visible in future sessions.