I wrote some time ago how you can pass context to Eclipse components
using component preferences that are defined in the CA XML. This allows passing composite application specific context to the components. As an extension to this we want to provide another mechanism so that you can pass context to composite applications when you open them via URL. So you can open one and the same composite application with different input parameters.
In the next public beta (second public beta/third beta/M5) there will be a new type of URL, the CAI URLs. With CAI URLs you can point to composite applications and pages in composite applications no matter whether they are NSF based composite apps or Portal based composite apps.
CAI URL format (square brackets [ ] denote optional parts)
o cai:// is the start of the CAI URL format
o appInstanceID is the unique identifier for the application
o [/pageID] is an optional unique identifier for a page in the application
o [hint] is the URL for retrieving the application if it is not already available in the client. Although this piece is optional, if it is not used and the application is not already installed in the client, then the application will fail to open. This hint can either be a HTTP URL when Portal based apps are used or a NRPC URL for NSF based composite applications
Opening a connection to a CAI URL will cause the corresponding application to be projected to the client or updated if already on the client, and then opened in the user interface to the specified page. If no page is specified, the first page in the application is opened. This just described URL format is planned to be public in Lotus Notes 8.0 and Lotus Expeditor 6.1.1.
The CAI URL is used internally in the UI when you've opened a composite application and want to copy a link to the application or a page of the current application.
When we built the mail application as composite application however we figured that this is not sufficient. In mail you want to be able to bookmark not only the mail page, but also a specific folder in the mail page as you can do it today with Notes 7. So we needed a mechanism to pass context (in the sample the current Notes folder/view of the Mail Inbox View component view) to the components in the composite application when it is opened. For this purpose we've introduced an extension that we will use in M5 internally for mail and that we might publish in Lotus Notes 8.0.1. As always pls let us know whether this is how you would want to see this capability to be published.
You can add your own parameters to the CAI URL. In my little sample I've added '&NiklasTest=NiklasTestValue' to the bookmark in my document. Here is the orginal url as generated by Edit-Copy As-Application URL:
And here is my changed URL:
When the composite application is now opened additional 'dynamic' preferences are added for all components. So the parameter 'NiklasTest' is made available to every Eclipse component in the composite application. The Eclipse components can access this information as every other component preference. So I was able to use the same topology manager code that I had used already for this sample
and change only one line. As you can see the URL parameters can be accessed via 'com.ibm.portal.app.input.' plus your URL parameter name.
String values = data.getPreference("com.ibm.portal.app.input.NiklasTest");