APPLICATION DESIGN


Adding actions to navigators
After you add objects to a navigator, you automate the objects by attaching actions to them. For example, to program a graphic button so that it opens a particular view when a user clicks it, select Run: Simple Actions and then choose "Open a view or folder" in the Action field of the Programmer's pane. Then select a particular view in the Programmer's pane.

Simple actions for navigators

You can use these simple actions for navigators.

Action: Open a view or folder

When users click an object that opens a view or folder, the preview pane (if it is open) changes to display the selected document in the new view or folder.

Action: Alias a folder

When users click an object that activates a folder, the folder activated by that object replaces the current folder (if one is open). To return to the original folder, use View - Go To.

Action: Open another navigator

When users click this object, the current navigator (if there is one) is replaced by the new navigator. The replacement navigator must be from the same database.

Action: Open a link

The action prompts you to paste a link to a document, view, or database. When a user clicks this type of object, IBM® Lotus® Domino(TM) Designer presents the specified document, view, or database.

Action: Open URL

The action prompts you to specify a URL to open. Clicking the navigator object opens the URL.

Custom actions

You can use an @function formula or a LotusScript program to define a custom action. A navigator that runs an @function formula allows you to create specialized actions that aren't related to switching to a view, a folder, a navigator, or a link.

To attach an action

1. Create a new navigator, or open an existing navigator.

2. Select a navigator object.

3. In the Programmer's pane, click "Run: Simple action(s)."

4. Select the simple action to run and supply any required information.

5. Close and save the navigator.

To attach a formula or script

1. Create a new navigator, or open an existing navigator.

2. Select the navigator object.

3. To add a formula, select "Run: Formula" in the Programmer's pane. Then, type the formula and click the green check mark to confirm it.

4. To add a script, select "Run: LotusScript" in the Programmer's pane. Then, write the LotusScript program.

5. Close and save the navigator.

For more information on writing formulas and scripts for buttons and hotspots, see the Domino Designer Programming Guide.

Examples

This section includes examples of automating navigators.

Opening a view
A navigator that switches to another view gives users a graphical way to choose a view so they don't need to know the name of a view in the view pane. The Main Navigator in the Discussion template uses objects to open these views: All Documents, By Category, and By Author.

Creating a navigator object that opens a navigator
A navigator object (such as a button) that switches to another navigator is a graphical way to guide users through a series of decisions to reach the information they need.

This navigator displays a bar chart created in 1-2-3.

To find out more information, users click a bar that represents an area's sales. Each bar in the first navigator is a hotspot rectangle that takes users to the Weekly Details by Country navigator. When users reach the second navigator, they see another bar chart that displays weekly sales by individual country. Clicking a bar in this chart opens the view for the country (for example, View by country\France). Each bar in the second navigator is a hotspot rectangle whose "Open a view or folder" action specifies the appropriate country view.

Creating a shortcut navigator with an @function formula
This shortcut navigator allows users to click the icon instead of using the Create menu to create a new Action Item document.

The action for the icon is "Run a formula" with the formula:

@Command([Compose];"";"3. Action Item")

Making a navigator object that runs a LotusScript program
When users double-click the navigator object (for example, a button), this script opens the current database:

Sub Initialize
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Set db = session.CurrentDatabase
    Call db.Open("", "")
    Messagebox(db.Title & " " & db.FileName)
    If db.IsOpen = True Then msg$ = "open" Else msg$ = "closed"
    Messagebox("Database is " & msg$)
End Sub

See Also