Editor's note: Know a lot about this topic? Want to share your expertise? Participate in the IBM Lotus software wiki program today.
This article presumes that you have read the companion developerWorks® article, "Basics Steps: Converting an IBM Lotus Notes application to use Lotus Notes 8 Java components," and and that you have performed the steps listed there.
Add the side preview option
Now that the modifications are complete, you can go back to Lotus Domino Designer to make further modifications.
You can add a Show drop-down action to the right side of your action bar to allow users to show a preview on the bottom or on the side.
Follow these steps:
- Select File - Exit from the Lotus Notes client.
- Open the notes.ini file (in the directory where Lotus Notes is installed) in an editor, such as Notepad.
- Add the following setting to the file: Designer_ShowPropForJavaViewsUI=1.
- Save your changes and close the file.
- Open Lotus Domino Designer and open your new application.
- Select View in the Navigator.
- Double-click to open one of the views.
- Select File - Properties and switch to View.
- Select the Show Vertical/Horizontal switcher option to add this option to your application.
- Complete the action described in the previous step for each view in which you want to select this option. See figure 1.
Figure 1. Lotus Domino Designer: Select Show Horizontal/Vertical switcher
Dynamically size one column
In Lotus Notes 8, in the mail views, you marked the Subject column to be dynamically sizeable, so that as the user resized the list view (by making the sidebar wider or narrower) the Subject column would grow or shrink, allowing all the other columns to be the same width. This step enabled fluid resizing without introducing a horizontal scroll bar.
As the user shrinks the view, this column continues to shrink until it reaches its minimum width. Then, the software switches the view to narrow mode.
To set this dynamically sized column, follow these steps:
- Open Properties for the column that you want to be dynamically sized.
- Select the option Extend to use available window width.
Create narrow views
In addition to being able to see a preview on the side, Lotus Notes 8 introduced narrow views in the mail views. The narrow views allow users to see their mail without the traditional column headers and with more information stacked.
For each narrow view, you need to specify:
- Where to put the column – that is, to keep it on the top row, wrap it to the second row, or hide it all together. This positioning is done using the setting If view is narrow in the column properties (tab 6). The options are Keep on top, Hide this column, and Wrap to second row.
- If this field stays on the top row, whether the second row should be
vertically justified to start directly beneath it. Again, this option
is set under the column properties, tab 6, setting: Justify second row
under this column as shown in figure 2.
Figure 2. Second row alignment
- The order of operations – that is, which column is handled first,
which column is handled second, and so on. For example, you can set
the view up so that one column wraps first, and then as the view
narrows, a second column hides, and when it narrows further, a third
column wraps, and so on. You can use the sequence control to label the
columns as the first, second, or third, as shown in figure 3.
Figure 3. Defining the order of operations
Add actions to the Show drop-down window
In Lotus Notes, we’ve added more actions to the Show drop-down window, which allow users to control their views. "Unread Only" is an example of an additional action. See figure 4.
Figure 4. Show drop-down on action bar
To add an action to the Show drop-down window, open the Shared Action properties box. Then, select the property Right align action control as shown in figure 5.
Figure 5. Showing an action in the Show drop-down
You can also set some new attributes for your columns. You can see these attributes used in the Mail 8 template. These settings display in the Attrs: field for the Column properties.
There are five new choices as shown in table 1.
Table 1. New column attributes available for Java views
|$ThinColumn=true||Makes a thin column|
|$MaskSelectionColor=true||Makes a row highlight bar not visible on this column|
|$TypeHeaderIcon=index:colicon1:129||Puts an icon in a column header|
|$ShowGradientColor=true||Adds gray background to a column|
|$ShowThreadTwistie=true||Displays a twistie icon in the column|
To make these changes, select the column that you want to change and then follow these steps:
- Select File - Properties, and then select Column.
- In the Attributes area (labelled Attrs:, tab 6), you can insert any of the attributes shown in table 1. If you want to use multiple attributes, separate them with a semicolon.
- Notice that there are also settings for adjusting the view when it is in narrow mode.
- Save your changes by closing the view.
Create a business card view
Lotus Notes 8 introduced a business card view in the Contacts area. You can also create business card views for your applications.
The viewer that defines how the view is displayed can be set in the View properties window in the Viewers field as shown in figure 6. The applicable viewers to list here are Table, Tiled, or Calendar. If no viewer is specified, then Table is used as the default (a standard view). You can also combine them by separating the entries with a semicolon; the viewers then display on the Show menu as options.
Figure 6. Controls to show business card view
For each column in the view, you need to specify where to display the field (top, bottom, or hidden) and on what line as shown in figure 7.
Figure 7. Formatting the column and field in the tiled (business card) view
Create tabbed or alpha views
The Lotus Notes 8 contacts view has alpha tabs that display to the left of the view (see figure 8). Clicking a letter in the alpha tab filters the view to that letter.
You can also have alpha tabs in your views by selecting Show Tab Navigator in the View properties. See figure 9.
Figure 8. Alpha tab
Figure 9. Tabbed navigator views
Turn on threads in a view
In Lotus Notes 8, we introduced threaded views, integrated into the inbox as shown in figure 10.
Figure 10. Threaded view in the inbox
You can use these threaded views in your application but with restricted use because the current design is targeted only for the mail template. For example, the text "messages in this conversation" is currently fixed.
Start by selecting the Support Response Thread History option for your application. You can make this selection in the Database properties window, as shown in figure 11.
Figure 11. Selecting the Support Response Thread History option
Selecting this option creates an internal cache or index for the threaded views. By default, this cache goes back only seven days. You can change the default setting by adding the ini MAX_DAYS_FOR_THREAD_CONVERSATIONS=365 (or different high value to specify the number of days) to Notes.ini.
Assuming that you have already created an application that surfaces the Java views by following the steps in this and the previous article, you need to add two views to your application. One view controls how the threaded view looks, and the other view acts as the response hierarchy index.
Create a new view in your template (using the default design) and call it ($ThreadsEmbed); make it hidden by surrounding it with brackets. Select the properties Show response documents in a hierarchy and Show partial response hierarchies as shown in figure 12.
Figure 12. Settings for the new $ThreadsEmbed view
For the column that is your subject or topic, go to the properties and enter $ThreadSubject=true in the Attrs field. See figure 13.
Figure 13. Setting the $ThreadSubject attribute
Create a second view (again using the default design) and call it (Threads); select the Evaluate actions for every document save and Show response documents in a hierarchy options for this view, too.
You then need to add a property to your composite application XML file. Follow these steps:
- Select Actions - Edit Application.
- Select the view component and right-click Edit Component Properties.
- From the Advanced tab, add the property com.ibm.rcp.csiviews.viewpart.threadurl with a value of notes:///0000000000000000/Threads?OpenView. See figure 14.
- Select File - Save & Close.
Figure 14. Adding the XML property threadurl
Next you need to configure the visible view that you want the threaded view to work with. In the View properties window, do the following as shown in figure 15:
- Clear the Show response documents in a hierarchy option.
- Select the Show Vertical/Horizontal switcher option.
- Select ($ThreadsEmbed) in the Thread View field.
- Select the Allow conversation mode option.
Figure 15. Specify the view to show on twistie expansion
You also need to add a column where you want the twistie to display to allow the user to select the threaded view. To do this task, follow these steps:
- Add a column with a value of "" (nothing).
- Make the column a size of 1.
- In the Attrs field, enter $ShowThreadTwistie=true. See figure 16.
Figure 16. Setting the twistie attribute
Then you might want to use the Conversation v Messages options that are visible in the mail client in the Show menu. Conversations show only the latest response for each e-mail conversation. Messages show everything. These are standard actions with the property Right Align action control selected. They set the environment variable $VIEW_CONVERSATION_MODE to 1 for Individual Messages and 2 for conversation mode.
Add separator lines to the navigator
In the navigator for your application, you can add separator lines between entries as shown in figure 17.
Figure 17. Separator lines in the navigator
To do this, open Lotus Domino Designer and follow these steps:
- Click Shared Code.
- Click Notes Mail Outline.
- In the Outline Entry, select the Display separator above this entry option to add a separator line in your navigator.
Create right-click context menus in views
By default, right-click context menus include the default items such as document properties. You can turn these defaults off and select your own menu items, with images and submenus.
First, you need to turn off the default items:
- Open Lotus Domino Designer.
- Open Action Bar Properties.
- Clear the Show default items in right-mouse menu option.
Then you turn on individual actions to display in the context menu using the setting Include in right mouse button menu. This setting can be found in the action properties box.
You can create icons and submenus as you would for any Lotus Notes action bar menus. For complex menus it might be easier to create separate right-click entries in the action bar so that you can use specific icons and separation.
You can also right-align text for keyboard shortcut information by including @Char(9) between your Label and your shortcut as shown in the Label field in the Action properties window in figure 18. Figure 19 shows the final content menu.
Figure 18. Right-aligning a shortcut in the content menu
Figure 19. Final right-click context menu
This article has outlined individual steps that allow you to customize and modernize your applications. You should now have many of the tools available to make your custom applications look like the Lotus Notes 8 native PIM applications (Mail, Calendar, Contacts, To Dos, and Notebook).
- Participate in the discussion forum.
- Read the companion developerWorks article, "Basics steps: Converting an IBM Lotus Notes application to use Lotus Notes 8 Java components."
- Read the developerWorks article, "What's new in IBM Lotus Notes 8.5."
- Refer to the IBM Lotus Notes and Domino 8.5 product page.
- Refer to the IBM Lotus Domino Designer 8.5 Help.