Lotus: Using Advanced Properties in your components

THEMES: Lotus\Notes/Domino 8 | Lotus\Composite Appl...
YEAR: 2007
Login Login
User: Anonymous

LABEL: Composite Application | Lotus Notes 8 | Lotus Notes API

Comments/attachments: Close
Using Advanced Properties in your components

One feature in composite applications is the ability for the administrator or the end user to modify or add properties to components. For instance, in Portal you can add new portlet preferences to your portlet instance and then use those values in your portlet. Those same preferences are available in your Notes and Eclipse components on the client. The preferences can also be modified in the advanced properties button in the Composite Application Editor.

Here is a screen shot of the preferences assigned to a view in my Notes 8 Mail file:

The Topology Handler service is used to retrieve these preferences with the getComponentData() method on the service.

ServiceTracker topologyTracker =
new ServiceTracker(
Activator.getBundleContext(), TopologyHandler.class.getName( ), null);

topologyTracker.open( );

TopologyHandler handler = (TopologyHandler )topologyTracker.getService( );

if (handler != null){
ComponentData cd = handler.getComponentData(SWTHelper.getFullViewID(this));

if (properties != null && cd != null && cd.getPreferenceKeys().length > 0)

So if your component allows for the setting of multiple entries you can design a pattern where you can fill in lists of data. One of the samples I created reads in URL's from the same list of preferences and then populates a list control of which URL's the user can navigate to. In the CA XML they look like normal preferences but the component looks for the name pattern "urls_N". These same parameters can be edited with CAE.

<preference name="urls_1">
<base:value value="http://www.lotus.com"
readOnly="false" xsi:type="base:String" required="false" />
<preference name="urls_2">
<base:value value="http://www-03.ibm.com/developerworks/blogs/page/CompApps"
readOnly="false" xsi:type="base:String" required="false" />
<preference name="urls_3">
<base:value value="http://www-10.lotus.com/ldd/expforum.nsf"
readOnly="false" xsi:type="base:String" required="false" />
<preference name="urls_4">
<base:value value="http://www-128.ibm.com/developerworks/lotus/community/"
readOnly="false" xsi:type="base:String" required="false" />

Here is a screen shot of that same sample that uses those preferences: