Defining an Object List View Extension
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.
Extending a vSphere Object List View
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.
Example: Example Extension to Object List View shows part of an example 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.
Example: Example Extension to Object List View
<!-- 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>
 
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.
Adding a List View for a New Object Type
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 new object’s 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 new object’s template namespace. The format for a new object’s list extension point is typically namespace.list.columns. The list extension point for a new object called a Chassis, for example, might appear as follows, where the template namespace is myExtension.core.Chassis:
myExtension.core.Chassis.list.columns
Example: Example Extension to Object List View shows a partial example of 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.
Example: Example Extension to Object List View
<!-- 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>
 
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.