As promised, here is the step by step tutorial for adding the attachment viewer to your email. Go ahead and check out the video before you begin so you will get a clear picture of what I am talking about – in case you missed the post. While these steps are very basic, I am going to explain them using the very technical Eclipse terminology so in the end you will surely know how the Notes 8 client is constructed and especially Mail. 🙂
Attachment viewer in Lotus Notes Mail
Step by Step Instructions
First step is to install the widget. You will need Toolbox enabled in the Notes client in order to do this. You can drag and drop the widget right from this page into your My Widgets view. This installs the Eclipse feature and plugin that contains the SWT ViewPart into the client – which is exactly the same view part we will be placing in our mail file.
Next, if you did not install The Composite Application Editor (CAE) when you installed Lotus Notes then you will need to re-install and make sure it is selected in the install options. The CAE will allow us to tell the Eclipse subsystem how perspectives (Documents) will be opened. We are going to change email so the Memo and Reply forms will be opened into a composite page versus just the document view opening in its own tab.
Open your mail file in Lotus Notes, then at the top, in the menu select Actions | Edit Application. It should be at the bottom of the list. If you do not see this option then you have one of two problems: 1 – the CAE is not installed or 2 – your mail template is not version 8 and above.
The first step we will do in the CAE is turn on a setting at the application level. You access the application properties by clicking the menu of the Page Navigator menu:
When the dialog opens, navigate to the Advanced tab and create a new property called com.ibm.rcp.useClonePages and set its value to true.
This application property tells the composite runtime to open any document doubled clicked in the application inside of a corresponding composite page. We will then create two new pages in the hierarchy called Memo and Reply – meaning any time a document where the form name equals “Memo” or “Reply” the corresponding page is opened instead. This setting is what controls that logic path.
Next, right click on the Mail page in the Page Navigator and bring up the context menu. Select Add Page and then After…
When the dialog appears name the page “Memo“. This is very important because this fills in the alias property of the page which needs to be the same value as the name of the form in the document being opened. You can verify this by right clicking on the new Memo page in the Page Navigator and bring up the Page Properties.
As shown in the screen shot, you can also use the Select button to change the page icon. This will then be used when the Memo form is open in its own tab. Close the dialog by clicking the Ok button.
We will now add some components to the page but first we need to define the components in our Component Palette.
Under the Component Palette select the Add Component button and then select NSF Component:
When the dialog comes up you can name it whatever you want. Then select the Browse button and just click Ok with the Database option and the users mail file. In the end, the URL is not even used because this view part is simply a placeholder for the document being open.
Next, click the Advanced button (which should now be enabled) and add the com.ibm.notes.isDocumentPlaceholder property and set it to true. This tells the CA run-time to use this view part for the document being opened within the composite page. *There can only be one component on a page with this setting set to true.
Click Ok on both dialogs and then the component should be added to the My Palette area of the CAE. You can then drag that component from the My Palette to the center of the screen to place it on our new page.
We are almost done with the first page!
Next we are going to add the Attachment Viewer to the Memo page. We need to find the component since it does not show up on the palette automatically. CAE has a neat little utility that scans the Eclipse view registry to see what views are installed in the system. The dialog will show any view part that has the allowMultiple setting set to true – which the Attachment Viewer does!
Once you select this a dialog will appear, since the views title begins with “a” it should be close to the top of the list. Look for “Attachment Viewer“. Select the Attachment Viewer component and click Ok.
This adds the component (Eclipse View) to the palette. You can then drag the Attachment Viewer from the palette to the screen positioning it under the Memo component. You can also change the height of it so it is very small at the bottom of the screen – this is the height of the component when a memo document is open in the client. You can click on the image below to see how small I made it.
You can now use the application as is or go ahead and create pages for Reply or the other mail file forms like calendar entry, etc.
Close the Composite Application Editor and make sure you save your changes.