Table of Contents |
Next |
Previous
This article contains the following sections:
- Using static links with NSF components
- Using dynamic links with NSF components
- Using profile documents to provide dynamic links with NSF components
- Putting component references to NSF components in an NSF via a profile document
- Changing the composite application properties in the Composite Application Editor to point to profile documents
In order to refer to an NSF component in a composite application, Notes URLs are used. For more information refer to the ''Specifying valid notesurl entries," "Publishing the Notes URL of a selected document in a view on selection change," and "Deploying NSF-based composite applications with components in the same NSF" topics in the "Composite Applications - Design and Management" section of the Domino Designer help.
The Composite Application Editor sets these URLs directly when you use the NSF component picker and stores them in the composite application CA.XML file. For example:
Property: com.ibm.notes.notesurl
Value: Notes:/85257474005EA3B7/View2?OpenView&hidenavigator
Using static links with NSF components
You can refer to NSF components via static links. Notes URLs are used to refer to components. The following illustrates how to refer to NSF components via static links with Notes URLs:
Sample server information:
Domino server name: jdoe-1/JDie
Domino IP address: 127.0.0.1
Domino DNS address: jdoe-1.us.ibm.com
Sample server NSF component information and example Notes URLs representing the information:
server: jdoe-1
path: a_dir/mycomp.nsf
rep id: 852574AA00357B98
Notes://jdoe-1/852574AA00357B98?OpenDatabase
Notes://127.0.0.1/852574AA00357B98?OpenDatabase
Notes://jdoe-1.us.ibm.com/852574AA00357B98?OpenDatabase
Notes://jdoe-1/a_dir/mycomp.nsf?OpenDatabase
Notes://127.0.0.1/a_dir/mycomp.nsf?OpenDatabase
Notes://jdoe-1.us.ibm.com/a_dir/mycomp.nsf?OpenDatabase
Sample local NSF component information and example Notes URLs representing the information:
local database: mycomp.nsf
path: a_dir/mycomp.nsf
rep id: 852574AA00357B98
Notes:/852574AA00357B98?OpenDatabase
Notes:/a_dir/mycomp.nsf?OpenDatabase
Notes URL values are set in the advanced NSF component property com.ibm.notes.notesurl. This property can be edited in the Advanced tab of the Edit Component Properties panel of the Composite Application Editor. The following screenshot illustrates where to find this:

Using dynamic links with NSF components
You can also refer to NSF components via dynamic links. The Notes URL can contain paths to databases or it can contain replica ids.
The special Notes URL
notes:/0000000000000000 is very useful when referring to NSF components in the same application as the CA.XML. Using this special Notes URL can help you avoid the situation where you would have to change the CA.XML with the new Notes URL whenever you move the NSF to another server or whenever you create a new NSF based on an NTF. The usage of this URL is recommended for this scenario. For more information, refer to
http://www-10.lotus.com/ldd/compappwiki.nsf/dx/deployment-of-nsf-based-composite-applications-with-components-in-the-same-nsf.
To identify special types of databases, special 'replica ids' can also be used. For example:
notes:/0000000000000E00 - opens the current user's mail database
notes:/0000000000000E01 - opens the current user's contacts database
To refer to NSF components in databases other than the CA.XML, dynamic links can be used. Dynamic links can be used via @Formulas that are executed in the database containing the CA XML.
The @Formulas are defined in the Advanced Component Properties in the Composite Application Editor using the "com.ibm.notes.ComputedNotesURL" property. For example, with these @Formulas you can access fields in Notes profile documents that can contain the links to the databases (the next section provides an example that uses a profile document).
The values in these profile documents can then be changed via LotusScript as part an automated deployment. For more information, refer to:
http://www-10.lotus.com/ldd/compappwiki.nsf/dx/how-to-calculate-links-to-nsf-components-at-runtime.
The "com.ibm.notes.ComputedNotesURL" property can contain any formula that returns a valid Notes URL. It is recommended that you use profile documents in these formulas for performance and ease of use. The next subsection provides an example of how to use a profile document.
Using profile documents to provide dynamic links with NSF components
To replace static links with dynamic links when deploying NSF components, the property "com.ibm.notes.ComputedNotesURL" needs to be defined for each single NSF component. This can be done using the Composite Application Editor (see
http://www-10.lotus.com/ldd/compappwiki.nsf/dx/how-to-calculate-links-to-nsf-components-at-runtime). In order to set the actual links, values have to be set in "profile documents."
Important: This is a deployment step that needs to be done
before the actual NSF is deployed. Profile documents reside in the database with the CA.XML -
not in the actual NSF component databases.
The high level steps for creating profile documents and setting links are the following
- Put component references to NSF components in an NSF via profile document. This includes doing the following:
- Create a profile document
- Create an agent to edit the form
- Run the CAProfile action
- Change the composite application properties in Composite Application Editor to point to profile documents.
These steps are now explained in detail.
Putting component references to NSF components in an NSF via a profile document
Complete the following tasks to put component references to NSF components in an NSF via a profile document.
Creating a profile doc
In your composite application, use the following command pattern for the preference com.ibm.notes.ComputedNotesURL:
@GetProfileField("URL_Profile_Document";"NotesURL")
The preference com.ibm.notes.ComputedNotesURL contains a Notes @function that is used to set the NotesURL. As an example, look at the following command:
@GetProfileField("CAProfile";"MyComponentKey")
In this example, a profile document exists as a form in the your Notes database that contains the composite application. The profile document form name is "CAProfile" and contains a field "MyComponentKey" which contains the value to be used for the NotesURL.
To create the CAProfile profile document form in your composite application with Domino Designer, use the following steps:
1. Create a new form in the composite application database and name it "CAProfile"
2. Create a field on the form for each URL that you will need to store. Say, for example, that your application database has two Notes components, a navigator and a banner. You would create two fields named "Navigator" and "Banner."
3. Deselect the Display options in the Form properties.
4. Save the form.
Creating an agent to edit the form
You now need to create an agent to edit the form. The formula for this is the following (using the example form name):
@Command( [EditProfileDocument] ; "CAProfile" );
In the agent Properties box, set the Target to "None."
The next step is to open the application as a database. Use the following steps to do this:
1. Open Notes and use Ctrl-O to launch the Open Database dialog box.
2. Select the database associated with your composite application.
3. Hold down the Ctrl and Alt keys as you click OK . This causes the database not to open as a composite application but rather as a regular NSF.
Running the CAProfile action
You now run the CAProfile action by doing the following.
1. From Notes, select Action-Edit CA Profile.
2. Copy in the URL for each component. Notes URL values are set in the advanced NSF component property com.ibm.notes.notesurl. This property can viewed in the Advanced tab of the Edit Component Properties panel of the Composite Application Editor.
Changing the composite application properties in the Composite Application Editor to point to profile documents
Use the following steps to update the application to use the profiles:
1. Close the application
2. Open the application as a composite application using the Composite Application Editor in the Notes client. To open an application in the Composite Application Editor, select Actions-Edit Application, when the application is open in the Notes client.
3. In the Composite Application Editor, select Advanced Properties for each of the Notes components in your application. In this example, the Notes components would be the navigator and banner. These were referenced by the two fields "Navigator" and "Banner" you created earlier.
4. For each Notes component, add a new property named com.ibm.notes.ComputedNotesURL and provide it with a value. For this example, use the following: @GetProfileField("CAProfile";"Navigator")
5. OPTIONAL STEP - Delete the original notes URL property in the application.
We now continue the discussion about how to use links when referring to different types of components.
Table of Contents | Next | Previous