VMware Cloud Community
dhruvatejvemula
Contributor
Contributor

How to obtain the context object in a vSphere web client service

Hi,

I'm writing a vSphere Web Client plugin and I need to obtain the context object in my service layer. How do I go about doing that? For instance, in my client if I navigate to vCenter A > Datacenter X > (my custom tab) and click on a button, I should be able to retrieve this information in the service.


I realize that I can explicitly send the context object from the client to the service, and then use the VimObjectReferenceService, but is there a way I can get it automatically? Like I use UserSessionService to get the user session without me having to send anything from the client.


Thanks a lot!

0 Kudos
0 Replies