Lotus: How to call a JFace dialog from NSF? via Composite Applications

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


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

Comments/attachments: Close
 
Resources
How to call a JFace dialog from NSF? via Composite Applications
http://www-03.ibm.com/developerworks/blogs/page/CompApps?entry=how_to_call_a_jface&ca=drs-bl

I've been asked recently several times how Composite Applications relate to mashups. I think Composite Applications are a superset of mashups. Mashups and Composite Applications support tightly coupled components. Mashups and Composite Applications can trigger dialogs with additional information from another service (example when Google Maps comes up for a selected address). In addition to mashups however Composite Applications also support loosely coupled components. In this entry I want to focus on how Composite Applications can be used to build a mashup as many people think of it.

Check out this screenshot. It shows a very simple application that I've built. When you click on a view entry in Notes a JFace dialog comes up with the selected value.



I admit the sample is not that sexy. I've tried to keep it as simple as possible so that other people can build it also. I've used our simple tutorials as starting point. I exchanged the implementation of the Java action to pop up a message box:
Shell shell = new Shell();
org.eclipse.jface.dialogs.MessageDialog.openInformation(
shell,
"My SWT dialog displaying value from NSF",
"Selected category: " + val);

The real trick was then to hide the ViewPart of my Eclipse components. You can do this easily by setting a preference in the Composite Application Editor:

com.ibm.rcp.visible=false



I think this is pretty cool. It shows how easy it is to build mashup-like functionality with Composite Applications.

Niklas