VMware {code} Community
abhishekdubey
Enthusiast
Enthusiast

<dialogSize>0,0</dialogSize> is not working HTML5 however works in flex

Hi ,

I am using sdk-6.0.0.2559419 for developing webclient plugin which works on both flex/html5.

I have a use case where I want to invoke an action from the context menu of datastore and after that operation completes, I want to perform another action(navigation).

for which I need to delegate the action to a script using WEB_PLATFORM.sendNavigationRequest.

On UI i do not want to display the HTML page so i kept the size of HTML as 0,0   <dialogSize>0,0</dialogSize>  in plugin xml.

It works fine in Flex however in HTML5 it is not working and displaying default size html

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

      <object>

         <actions>

         

            <com.vmware.actionsfw.ActionSpec>

               <uid>chassis.navigate</uid>

               <label>Navigate to chassis</label>

               <icon>#{chasisicon}</icon>

               <delegate>

                  <className>com.vmware.vsphere.client.htmlbridge.HtmlActionDelegate</className>

                  <object><root>

                     <!-- execute the action on client-side (html view in a modal dialog) -->

                     <actionUrl>/vsphere-client/chassisui/resources/my-navigate.html</actionUrl>

                     <dialogTitle>Datastore Test</dialogTitle>

                     <dialogSize>0,0</dialogSize>

                      <dialogIcon>#{chassisicon}</dialogIcon>

                  </root></object>

               </delegate>

            </com.vmware.actionsfw.ActionSpec>

0 Kudos
1 Reply
_vladi_
VMware Employee
VMware Employee

Hi,

I guess this use case works on the Flex Client rather by accident than by design. 

It is not supported by the HTML Client - semantically it does exactly what it is supposed to do: open a view with size 0,0.

Generally, as UX guidelines go actions are not intended to trigger navigation so your workflows should not depend on that. The reason is in the asynchronous nature of the headless action execution, e.g.:

 - User clicks the action

 - Operation is triggered

 - While the operation is in progress the user continues to use the Client (e.g. selects a VM)

 - In the middle of user's work on the VM the operation completes

 - The user gets navigated away to the Datastore which is completely unexpected.

 

Instead, you can do one of the following:

 - use the modal dialog to show a progress bar and this way make the operation synchronous

 - trigger a vCenter task for your operation (usually from your backend) which gets displayed in the Tasks & Events panel of the Client.

Hope this helps. Please let me know if you have further questions on this topic.

Thanks.

Cheers,

Vladi

0 Kudos