Code Snippet: Get the unique ID of the active composite application

This code snippet on the CA Wiki shows how you can retrieve the unique id for a composite application.  Like Eclipse perspective Id’s, each application has a unique application idenitifier.  This means you can use this in many ways to idenitify or link to an application.  The CAI URL actually uses this id to resolve what application should be loaded.  We have an article that is pretty popular that uses the CAI url,  Passing context to components when opening composite applications.

The code snippet uses the current Eclipse perspective and finds what composite application the current page is in.  Once you get the perspective Id you can query the Topology API’s for all kinds of application, page, and component properties.  So a creative developer could put tickler data elements on applications, pages or components and look for them in special cases.

2 thoughts on “Code Snippet: Get the unique ID of the active composite application

  1. Could you please say something about ways to clone a perspective? E.g. a switch to always open a new instance of a CA when it is opened via CAI URL or a programmatic way to clone the currently focused CA.

    Can this be done in 8.0.1, 8.5 or 8.5.1?

  2. You can’t do it unless you use your own UI and the Topology clone API’s introduced in Notes 8.5 so it is not supported currently from the URL. We will have articles published for 8.5.1 once it is released.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.