jawalevijay05
Contributor
Contributor

How to Add the action on Custom Object which allows to select the multiple targets.

Jump to solution

We have the custom object list as below, on which we right-click for operation delete. We would like to delete the multiple objects at once.

Is there any way to handle this in vSpeher client 6.7 SDK.  The list does not allow multi-row selection. But if we don same for vSpehere core objects like cluster/host/VM we can do multi-row select

pastedImage_0.png

tried the acceptsMultipleTargets = true , but didd not work, Below is the extension point for action:

<extension id="com.xxx.snapshot.actions.deleteSnapshotAction">

      <extendedPoint>vise.actions.sets</extendedPoint>

      <object>

         <actions>

            <com.vmware.actionsfw.ActionSpec>

               <uid>com.xxxx.vcplugin.snapshot.actions.deleteAction</uid>

               <label>#{snapshotdelete.action.label}</label>

               <acceptsMultipleTargets>true</acceptsMultipleTargets>

               <delegate>

            <className>com.vmware.vsphere.client.HtmlPluginModalAction</className>

            <object>

                 <root>

                        <actionUrl>/ui/xxxx/index.html?view=remove-snapshot</actionUrl>

                        <dialogTitle>#{xxxx.deleteSnapshot.title}</dialogTitle>

                        <dialogSize>700,125</dialogSize>

                </root>

            </object>

          </delegate>

            </com.vmware.actionsfw.ActionSpec>

          </actions>

          </actions>

      </object>

</extension>

1 Solution

Accepted Solutions
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi,

Specifying "<acceptsMultipleTargets>true</acceptsMultipleTargets>" says that the given action can be execute on multiple targets. You should keep this.

In addition, you can add the following property to your "<templateId>vsphere.core.inventory.objectViewTemplate</templateId>":

<variable name="objectListViewSelectionMode" value="multi"/>

 

Have in mind that the custom objects extensibility has been deprecated and it is encouraged to be replaced with your own implementation.

 

Best Regards,

Denis

View solution in original post

2 Replies
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi,

Specifying "<acceptsMultipleTargets>true</acceptsMultipleTargets>" says that the given action can be execute on multiple targets. You should keep this.

In addition, you can add the following property to your "<templateId>vsphere.core.inventory.objectViewTemplate</templateId>":

<variable name="objectListViewSelectionMode" value="multi"/>

 

Have in mind that the custom objects extensibility has been deprecated and it is encouraged to be replaced with your own implementation.

 

Best Regards,

Denis

View solution in original post

jawalevijay05
Contributor
Contributor

Denis_Chorbadzhiyski​ Thanks, It worked.

0 Kudos