VMware {code} Community
rajsoni
Contributor
Contributor
Jump to solution

Navigate to Home page.

I want to navigate to  home page while click on any button in my plug-in page.

I used below code for few navigations already .

                       Private static const SETTINGVIEW_ID:String= “######”;

        var eventRefresh:NavigationRequest = new NavigationRequest();

                  eventRefresh.targetViewUid = SETTINGVIEW_ID;

                  dispatchEvent(eventRefresh);

can u suggest me the  “SETTINGVIEW_ID”  which should be used to navigate to Home Location which is nothing but the screen below:

ScreenShot :

       HomeView.jpg

1 Solution

Accepted Solutions
laurentsd
VMware Employee
VMware Employee
Jump to solution

The home page extension id is vsphere.core.controlcenter.domainView.

FYI, you see it in the URL after you login or when you navigate there manually:

  => https://localhost:9443/vsphere-client/#extensionId=vsphere.core.controlcenter.domainView

View solution in original post

0 Kudos
4 Replies
laurentsd
VMware Employee
VMware Employee
Jump to solution

The home page extension id is vsphere.core.controlcenter.domainView.

FYI, you see it in the URL after you login or when you navigate there manually:

  => https://localhost:9443/vsphere-client/#extensionId=vsphere.core.controlcenter.domainView

0 Kudos
walkaboot
Contributor
Contributor
Jump to solution

What about the inverse of this.  I'm attempting to navigate from a home shortcut to an Object workspace sub-tab.

According to documentation and assuming my extension id is registered as com.myApp.mySolution.subTab:

<extension id="com.myApp.mySoultion.subTab">
      <extendedPoint>vsphere.core.vm.manageViews</extendedPoint>
      <object>
      <name>myApp</name>
         <componentClass className="com.myApp.mySolution.views.ManageView" />
      </object>
   </extension>

I then make a home shortcut linking it to the above extension:

<extension id="com.myApp.mySolution.manage.Shortcut">
      <extendedPoint>vise.home.shortcuts</extendedPoint>
      <object>
         <name>MyApp</name>
         <categoryUid>vsphere.core.controlcenter.inventoriesCategory</categoryUid>
         <icon>#{shortcut.icon}</icon>
         <targetViewUid>com.myApp.mySoultion.subTab</targetViewUid>
      </object>
   </extension>

The Shortcut appears but when I click on it I'm getting a blank(gray) screen in the Main Workspace.  It seems to be navigating to an empty view but I can reliably reach the view by going to it through the Object Navigator.  I've also attempted a workaround by creating a global view with a view/mediator that makes a NavigationRequest to the extension id, but that gives the same result.  Just to test I changed the <targetViewUid> to vsphere.core.host.gettingStarted and again got the same results.

rajeshami
Contributor
Contributor
Jump to solution

Hi Walkaboot,

We are facing the same issue. We wanted to navigate from a shortcut to object workspace, but couldn't find any clue. We tried Chassis example, but its quite different/difficult. Can you please let us know if you succeed in doing this? please let us know. Thanks in advance.

0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

Having a shortcut extension pointing to a specific object's view is not really possible because the ShortcutSpec data would need to include that object's uid as shown below  (see also the com.vmware.vsphere.client.views.ShortcutSpec API):

<extension id="com.myApp.mySolution.manage.Shortcut">

      <extendedPoint>vise.home.shortcuts</extendedPoint>

      <object>

         <name>MyApp</name>

         <categoryUid>vsphere.core.controlcenter.inventoriesCategory</categoryUid>

         <icon>#{shortcut.icon}</icon>

         <targetViewUid>com.myApp.mySoultion.subTab</targetViewUid>

         <uid>YOUR_OBJECT_ID_HERE</uid>

      </object>

</extension>

Home shortcut extensions are reserved for global views.  You can provide a navigation link to a specific object view through program, using the com.vmware.ui.events.NavigationRequest API (in this case you can find out the object id at runtime).

0 Kudos