ShowTable of Contents
Each component in a composite application has a set of preferences that can be add/edited in the Composite Application editor in the Advanced Properties dialog box. You can make your components "data driven" using this model.
Here is the code snippet to get at these preferences:
TopologyHandler th = TopologyHandlerServiceFactory.getService();
String pref = null;
if (th == null) return;
The "id" can be the full view (component id) or the secondary id of the view
if you are in an IViewPart you could also write this:
ComponentData cd = th.getComponentData(SWTHelper.getFullViewID(this));
ComponentData cd = th.getComponentData(id);
if (cd == null) return;
pref = cd.getPreference("ca.wiki.my.preference");
null || pref.length 0) return;
The preferences support multiple values so we will always get an array returned, once you verify the result is not null or the length of the array is not zero you can access the first element (if you know its always a single value) using "pref".