Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Lab Exercises
PoT.Lotus.08.5.004.01
IBM Software
Contents
LAB 1 EVALUATING DAOS WITH MAIL FILES........................................................................................................5
1.1
1.2
1.3
12
1.4
SUMMARY............................................................................................................................................................................
13
14
2.2
39
2.3
SUMMARY............................................................................................................................................................................
46
3.2
3.3
69
88
4.2
94
4.3
4.4
113
4.5
SUMMARY..........................................................................................................................................................................
122
5.2
127
5.3
129
5.4
XPAGE CODING.................................................................................................................................................................
133
5.5
SUMMARY..........................................................................................................................................................................
135
6.2
SUMMARY..........................................................................................................................................................................
158
LAB 7 XPAGES.......................................................................................................................................................159
7.1
HELLO WORLD..................................................................................................................................................................
7.2
7.3
7.4
7.5
7.6
202
7.7
210
7.8
216
7.9
220
7.10
INPUT VALIDATION............................................................................................................................................................
227
7.11
229
7.12
7.13
7.14
232
7.15
235
7.16
239
7.17
240
7.18
THEMES (OPTIONAL)........................................................................................................................................................
244
Overview
159
175
Page 1
IBM Software
Page 2
7.19
7.20
248
7.21
257
7.22
261
7.23
7.24
IBM Software
Overview
The Notes and Domino 8.5 Upgrade Workshop is intended to provide the customer with an in-depth
examination of the new capabilities of version 8.5 of the products. For existing customers, this
exploration will help them assess the additional value and potential impact to their existing environment.
For new customers, this exploration will not only give them a hands-on experience with a product new to
them but it will also reinforce our advantages over the competition, such as the power of applications.
The objective of this session is to explore new features of IBM Lotus Notes and Domino 8.5 and prepare
participants for a successful upgrade.
Introduction
The IBM Lotus Notes and Domino 8.5 Upgrade Workshop Proof of Technology (PoT) provides a handson experience for those needing to explore the new features in version 8.5 and prepare for a successful
upgrade
This Proof of Technology (PoT) is designed to demonstrate the capabilities of IBM Lotus Notes and
Domino. Participants will receive a hands-on experience of the Notes Client, Domino Administrator, and
Domino Designer.
Requirements
You will need a Workstation with the VMware image for Notes Domino 8.5 Upgrade Workshop PoT
Icons
The following symbols appear in this document at places where additional guidance is available.
Icon
Page 4
Purpose
Explanation
Important!
Information
Troubleshooting
IBM Software
1.1
First we will look at the impact that sending of attachments has on the size of mail databases before the
Domino Attachment and Object Service is enabled.
1.1.1
On disk, evaluate the size of the mail files in the Domino 8.5 server's mail folder.
__1.
Open Windows Explorer and navigate to the c:\Lotus\Domino\data\mail directory and note the
size of the current mail files.
Lab 1
Page 5
IBM Software
1.1.2
__1.
Make sure the Domino server is running. If it's not, start the Domino server by double-clicking
on the Domino Server icon on the workspace. If prompted, start Domino as an application, not
a service. This applies to all labs.
__2.
Open the Notes client. Use the location for Natalie. Lotus password is passw0rd (note the
zero instead of o)
__3.
__4.
__5.
Send the memo to Dan Misawa, Ling Shin and Samantha Daryn.
__6.
Right-click on the attachment and select Attachment Properties. Note the length of the file.
__7.
After the mail message has been sent, evaluate the mail file sizes with Windows Explorer again.
1.2
In this step we will enable and configure the Domino Attachment and Object Service.
1.2.1
Configure the server to use the 8.5 ODS for new databases
__1.
__2.
__3.
If not already there, Add the following string at the end of the file:
Create_R85_Databases=1
__4.
Page 6
IBM Software
1.2.2
__1.
Open the Domino Administrator client if not already open. Use the Admin location with
username of sadmin/demoibm and password of passw0rd. (If the Notes client was still
running, you won't get prompted for a password when the Administrator client starts. Switch to
the Online Admin location and log in after it launches.) Press Cancel if you get prompted to
log on to instant messaging.
__2.
Edit the Server document for the Domino85/demoibm server. The Server in the upper left
area of the Admin client should say Domino85/IBMDemo. If it doesn't, pull down the File menu
and select Open Server. Choose Domino85/demoibm from the resulting drop-down list and
click OK.
Lab 1
Page 7
IBM Software
__3.
Page 8
Click the Configuration tab and expand the section for Server. Click Current Server
Document in the expanded section, then click the Edit Server button in the action bar.
IBM Software
__4.
__5.
In the Basics section, change Transaction Logging to Enabled - a message will display
advising you to place the log files on a separate drive. This is not necessary for our test
environment click on Yes.
__6.
__7.
__8.
1.2.3
__1.
Using the Domino server console, enter a restart server command. You will see console
messages reflecting the change.
Troubleshooting
It may appear that the server is hung give it a minute or
two as these changes can take a few minutes to
process..
Lab 1
Page 9
IBM Software
1.2.4
__1.
Edit the server document again, but this time navigate to the new DAOS tab
__2.
__3.
Accept the default minimum object size and DAOS base path (the Domino\data\DAOS
directory)
__4.
__5.
__6.
Once the Domino server is restarted, you should now see a DOAS folder beneath the data
folder on the Domino server (via Windows Explorer).
Page 10
IBM Software
1.2.5
Using the Domino server console, enter a show server command to observe
that the command reports the status of DAOS. It should look like the following
screen capture:
1.2.6
__1.
__2.
__3.
This will perform 2 functions updates the application's ODS and activates the use of DAOS.
You will see it recovering disk space in the mail files.
Note
There are other approaches for enabling DAOS, but this
is the most efficient way to perform both steps.
Lab 1
Page 11
IBM Software
1.3
Similar to what we did in the first step, we will check mail database sizes in the changed environment,
i.e. with the new Domino Attachment and Object Service running.
1.3.1
Evaluate the disk space reported now that DAOS has been enabled
__1.
Open Windows Explorer and navigate to the c:\lotus\domino\data\mail directory. Note the
disk space utilized you should see a dramatic difference in the size of the mail files. You
might need to refresh the view to pick up the new file sizes.
1.3.2
__1.
Log into the Notes client as Natalie Olmos again and create a new memo with a large
attachment.
__2.
__a.
__b.
Send the message to Dan Misawa, Ling Shin and Samantha Daryn
Page 12
Notice the disk space of the mail files the message was sent to.
IBM Software
1.3.3
__1.
Open the Domino Administrator client. Use the Admin location with username of sadmin/
demoibm and password of passw0rd.
__2.
__3.
Go to the Files tab and select the Mail folder to look at the size of the mail files.
__4.
Notice the difference between the Logical Size and the Physical Size. Again, you might
need to refresh the view here to get things to display properly. Press F9 on your keyboard to
refresh the Notes view.
Troubleshooting
If the Logical sizes still don't look right after a view
refresh, open a mail file, close it, then refresh the view
again. The Domino server doesn't calculate the logical
size of a database until it's been opened, so if you
haven't opened any mail files, then the logical sizes might
be off. In a real-world environment, users are always
opening their mail files, so this won't be a concern.
1.4
Summary
__1.
In this lab, the workshop participant has examined the new features of DAOS and has
successfully completed the new feature review.
Lab 1
Page 13
IBM Software
2.1
The Notes ID vault is an optional, server-based database that holds protected copies of Notes user IDs.
An ID vault allows administrators and users to easily manage Notes user IDs. Users are assigned to a
vault through policy configuration, and copies of user IDs are uploaded to a vault automatically once the
policy has taken effect.
The Notes ID vault has the potential to replace time-consuming, expensive ID file and password
recovery systems. Instead of administrators having to send out physical copies of ID files to new users,
the ID files can be automatically downloaded from the vault when the user first logs into their Notes
client.
Administrators can provide instructions in the Notes login window for users who have forgotten their
passwords, with either contact details or a link to a self-service password reset application
If ID files are lost or damaged, users are not hindered because copies of the IDs can be immediately
downloaded from the vault when users provide the correct passwords.
In addition, tasks involving the ID file, such as ID file synchronization, ID renames, and ID key roll-overs,
no longer require any user involvement and can automatically be handled by the ID vault, reducing
complication and saving time.
The "Auditor function can be used to extract ID files for legal discovery or access to encrypted data,
potentially preventing the loss of valuable information.
2.1.1
ID Vault creation
In this step we will use the Domino Administrator client to create and configure a Notes ID Vault
__1.
__2.
When the server has started, start the Domino Admin client from the desktop icon.
__3.
__4.
__5.
__6.
Page 14
IBM Software
__7.
__8.
__9.
Enter Demo for the Notes ID Vault name and description and click Next
Lab 2
Page 15
IBM Software
__10.
__11.
Accept Domino85/demoibm as the vault server this is the server on which the vault will be
created - and click Next
__12.
Accept sadmin/demoibm as the vault administrator this is the person who will have physical
access to the vault, will be able to add or remove other vault administrators and delete IDs from
the vault - and click Next
__13.
On the Organizations dialog, click Add or Remove, select /demoibm - only IDs certified with
this certifier will be able to be uploaded to the vault - and click Add and then OK and Next
__14.
For the names that are authorized to reset passwords select sadmin and Natalie Olmos and
click Add and then Next
Page 16
IBM Software
__15.
For the policy assignment, select Create a new policy assigned to specific people or groups
and click Next
Note
An efficient way to deploy the ID vault could be to create
a new policy assigned to a home server. This will result
in an auto-populated group being created which will keep
its membership in sync with the set of users whose home
server is selected. However, this involves waiting for
server background processes to populate the group and
to update certain hidden views in the Domino Directory.
For the purposes of this lab it is easier if we work with
individual users.
Lab 2
Page 17
IBM Software
__16.
On the Select People screen, click the Add or Remove button and select sadmin, click Add,
OK and then Next
__17.
Add some text in the Forgotten Password Help Text dialog and click OK
Page 18
IBM Software
__18.
__19.
The vault creation process will begin and you will be prompted to enter the location of the
certifier.
__20.
__21.
__22.
__23.
__24.
__25.
Select the IBM_ID_VAULT folder. This view shows the database that has been created to store
and manage the Notes Ids
Troubleshooting
If the IBM_ID_VAULT folder is not in the folder list press
F9 to refresh the view
__26.
Lab 2
The Vault Users view should be empty this is because no IDs have yet been uploaded
to the vault.
__b.
The Vault Servers view shows us the single server on which we have deployed the
vault. If we were to create replicas of the vault on other servers, those servers would
then be listed here.
__c.
The Inactive User Ids view should also be empty this view would show us any IDs
that were stored in the vault but were no longer in use within our environment for
example those for users who have left the organization.
Page 19
IBM Software
__27.
Open the ACL of the vault database. (File menu -> Application -> Access Control)
Notice that the only IDs who have any access to the server are the vault administrator and the
server on which the vault is deployed. All other entries in the ACL are set to have No Access.
Notice also the Auditor role. This has not been assigned to any ID yet. We will be looking at
this feature later in the lab so to save having to come back later, we will enable it now.
__28.
__29.
__30.
__31.
Expand the Security section of the navigator to see a new section here for ID Vaults.
__32.
Click on ID Vaults to see the directory entry for the ID Vault that we just created.
Notice that the ID Vaults Manage and Delete tools now become available in the Tools
navigator. The vault administrator can use these tools to amend the configuration of the ID
vault or remove it from the domain.
Page 20
IBM Software
__33.
Expand the Certificates section and click on the Certificates view. Collapse everything, either
with the menu selection, the toolbar button, or the Shift- keyboard shortcut.
__34.
Expand the Password Reset Certificates and Vault Trust Certificates sections.
__35.
These are the certificates that were created during the vault deployment process
Lab 2
__a.
Notice that there are two password reset certificates one for Natalie Olmos and one
for sadmin. The Password Reset Certificates show that these two users are certified
to reset passwords for IDs that have been certified by /demoibm
__b.
Notice that there is a single vault trust certificate between /demoibm and /Demo. This
shows that the Demo vault is certified to store IDs that have been certified by /demoibm
__c.
Switch to the People & Groups tab, click on Settings in the navigator
Page 21
IBM Software
Page 22
__d.
Open the DemoVaultSetting Security Settings document and click on the ID Vault
tab. This is the policy security setting that was created during the Vault deployment
process.
__e.
Notice that by default Allow automatic ID downloads is set to Yes. This means that a
user can download the ID as many times as they need after initial registration, a
password reset or an ID recovery action. If this field is set to No, administrators can
restrict the number of times an ID can be downloaded and for how long the ID is
available for download. Notice also that, by default, the user will be prompted to change
their password after a password has been reset.
IBM Software
__36.
__37.
Still in the People & Groups tab, click on Policies in the navigator.
__38.
Open the DemoVaultPolicy. This is the policy that was created during the Vault deployment notice that this is set to use the DemoVaultSetting security setting. Notice also the new Policy
Assignment tab. In Domino 8.5, users and groups can be assigned to explicit policies (instead
of explicit policies being individually assigned to users through the person document).
__39.
Click on the Policy Assignment tab and you should see the entry for sadmin.
2.1.2
In this step we will review how the IDs are uploaded into the vault for existing user accounts i.e:
accounts that were already in existence when the vault was created. During the vault creation we
created a policy and assigned it to a home server group for the server. Therefore the policy applies to
our administration user and the next time the user logs in, the Notes ID should be uploaded to the vault.
__1.
Close down any Notes or Domino Administrator client that you currently have open.
__2.
Launch the Notes 8.5 client and select Online Admin as the location.
__3.
__4.
Watch the status bar and you should see the message indicating that the Notes configuration
has been refreshed.
Lab 2
Page 23
IBM Software
__5.
Select File > Security > User Security from the menu
__6.
__7.
In the Your Login and Password Settings section you should see the message indicating that
the ID has been backed up into the vault.
Troubleshooting
It may take some time for the policy to be invoked.
During that time, the field highlighted above will be not
appear. If this happens, try manually forcing the policy.
To do so, open the Domino Directory on Domino85/
demoibm then open the person document for sadmin
and put it into edit mode. On the Administration tab, go
to the Assigned policy field and enter
/DemoVaultPolicy. Save and close the person document
then restart the Notes client, and try the steps again. If
that doesn't work, just wait a while. Proceed with the lab
section Process for new users, and check back on this
step later. Notes may not upload the ID file immediately.
Page 24
IBM Software
__8.
Click OK to close the dialog and launch the Domino Administrator client from the Open menu
__9.
From the Files tab, select the IBM_ID_VAULT folder and open the Demo database.
__10.
You should see a single record in the Vault Users view indicating that sadmin's ID has been
uploaded into the vault.
__11.
Open the record to see the entry along with the encrypted ID file.
Note
Although you could save a copy of the attached file in this
document it could not be used as a Notes ID file. The
only way to extract a working ID file from the vault is to
use the Domino Administrator tools.
Lab 2
Page 25
IBM Software
2.1.3
In this step we will review how the Notes ID vault can manage the distribution of Notes IDs to new users.
__1.
Make sure that you are logged into the Domino Administrator with the sadmin ID and switch to
the Configuration tab
__2.
__3.
You should be prompted for the password for the /demoibm certifier. Enter passw0rd as the
password and click OK
__4.
__5.
Page 26
First Name
New
Last Name
User1
Password
passw0rd
Explicit Policy
/DemoVaultPolicy
Checked
Check the Advanced checkbox so that the other options are displayed.
IBM Software
__6.
Click on the ID Info tab and make sure that In Domino Directory and In file are not
checked as locations for storing the user ID.
Notice that, as a result of selecting the DemoVault policy, the location In Notes ID vault has
been automatically selected and cannot be deselected.
__7.
Click the green tick in the bottom right corner to add New User1 to the registration queue.
__8.
Return to the Basics tab and perform the same steps to create a second user New User2
__9.
Select Register All to register the users and create the mail files and Notes IDs
__10.
Click OK to the People registered successfully prompt and then Done to close the dialog box.
__11.
Switch to the Files tab and open the Demo Vault again (IBM_ID_VAULT\demo.nsf). You
should see the new entries for New User1 and New User2 with their encrypted IDs attached.
Your admin ID might be here by now. If it is, go back up and complete that step, then come
back here.
__12.
In order to see what happens when a new client is configured, we will need to simulate a new
client installation. Close down any Notes or Administrator client that you currently have open.
__13.
Double-click on the Domino85 Computer icon on the desktop and navigate to the C:\Lotus
\Notes directory.
__14.
__15.
Delete all the lines below InstallType=2 but make sure that you leave the cursor on the line
below the last line of text when you save the document.
__16.
Then navigate to the C:\Lotus\Notes\Data directory and rename the names.nsf file to namesold.nsf Don't delete the original file as we will re-instate this later.
__17.
Start the Lotus Notes client and you will see the Lotus Notes 8.5 Client Configuration dialog you
would expect if you were starting an unconfigured client for the first time.
__18.
Lab 2
Page 27
IBM Software
__19.
Enter New User1 for Your name and Domino85/demoibm for the Domino server and click
Next
__20.
You should then be prompted for the user's password. Since the ID file has not been saved
anywhere except in the ID vault, the configuration process must be communicating with the ID
vault.
__21.
__22.
Click Next on the Additional Services dialog and the client should start up.
__23.
Select File > Security > User Security from the menu and enter the password again and you
should see the dialog indicating that you are using an ID that has been backed up into the vault.
2.1.4
Before we go any further we will re-instate the original NAMES.NSF as this contains location documents
for our users which match their user IDs with their mail files and ensure that, as we switch user
identities, we pick up all the correct user settings.
__1.
Close down any Notes or Domino Administrator client that you currently have open.
__2.
Double-click on the Domino85 Computer icon on the desktop and navigate to the C:\Lotus
\Notes\Data directory
__3.
__4.
__5.
Page 28
IBM Software
__6.
__7.
__8.
We will create a new location document for New User1 to make it easy to switch to the
appropriate Notes settings.
__9.
__10.
Click on Locations
__11.
__12.
2.1.5
__a.
On the Basics tab, change the location name to Online New User1
__b.
__c.
__d.
__e.
__f.
Switch to the Online - New User1 location and log in to test it.
In this step we will review what happens when a user forgets their password. For the purposes of this
exercise we will imagine that New User1 has forgotten their password and rings the HelpDesk to get the
password reset. Remember that we gave Natalie Olmos the rights to reset passwords during the vault
creation process. In this step Natalie, will reset the password for New User1
__1.
Close down any Notes and Domino administrator client that you currently have open.
__2.
Start Lotus Notes and select Online New User as the location.
Lab 2
Page 29
IBM Software
__3.
Notice that the text shown is the text we entered as the help text during the vault configuration
process.
__4.
Switch to the Online Natalie location and login with password passw0rd
__5.
__6.
__7.
Click on the People & Groups tab and then the People viewNavigate to New User1's person
document and with the document highlighted in the view select ID Vaults > Reset Password
from the Tools navigator on the right side of the screen.
Page 30
IBM Software
__8.
In the Reset User's Password dialog, enter a new password eg: resetPassw0rd1 and click
the Reset Password button.
__9.
When you receive a message indicating that the password has been successfully reset, click
OK.
__10.
__11.
Now let's login as New User1 again. Launch the Notes client and select the Online New
User1 location.
__12.
Enter the new password resetPassw0rd1. As specified in the policy, because the password
has been reset, you are now prompted to change the password to one of your own choosing.
__13.
2.1.6
In this step we will review what happens when a user changes their password on one copy of their ID.
First we will create a separate copy of New User1's ID to simulate the use of the Notes client on a
second computer. Then we will change the password on one copy of the ID and observe what happens
when we switch to the other copy of the ID.
__1.
Close down any Notes or Domino Administrator client that you currently have open.
__2.
Double-click on the Domino85 Computer icon on the desktop and navigate to the C:\Lotus
\Notes\Data directory
__3.
__4.
__5.
__6.
Lab 2
Page 31
IBM Software
__7.
__8.
Select File > Security > User Security from the menu and enter the password again.
__9.
__10.
__11.
__12.
Click OK on the Your password change succeeded dialog and click OK to close the User
Security dialog. As part of the password change process, the changed password information
has been synchronized with the ID vault record.
__13.
__14.
__15.
Enter newpassw0rd as the password and click Login. Notice that you are able to login with
your new password even though you did not change the password on this copy of the ID file.
__16.
Select File > Security > Switch ID again and switch back to the original user.id file.
2.1.7
In this step we will review how recovery from a corrupted ID can be achieved. In the case of corruption,
the affected user ID would need to be deleted from the data directory so that a new ID could be
downloaded.
__1.
Shut down any Notes or Domino Administrator clients that are currently open.
__2.
Double-click on the Domino85 Computer icon on the desktop and navigate to the C:\Lotus
\Notes\Data directory and delete any user ID files user.id, user1.id, user-old.id, that are here.
Do NOT delete any ID files that are in subdirectories of the Data directory.
__3.
__4.
Select the Online New User1 location and enter newpassw0rd as the password.
Page 32
IBM Software
__5.
Even though there was no user ID present you were seamlessly logged into Notes because the
correct password was entered allowing a new copy of the ID to be downloaded to your client
from the vault.
__6.
Check the C:\Lotus\Notes\Data directory and you will see a new copy of the user ID has been
created.
2.1.8
Auditor Feature
In this step we will review how an auditor can be configured to get access to a user's ID without their cooperation or knowledge. In order to perform this, a user must both be a vault administrator and have the
Auditor role configured in the ACL. When we were reviewing the ID Vault configuration, we assigned the
Auditor role to sadmin. In this step we will use sadmin's ID to download a copy of New User1's ID and
use it to login to Notes where sadmin would then be able to access any data encrypted by or for New
User1. To show this we will first send some encrypted mail to New User1.
__1.
From the bottom right corner of the client, select the Online Natalie location.
__2.
__3.
__4.
Lab 2
__a.
__b.
__c.
Page 33
IBM Software
__d.
Click on Delivery Options in the Action bar, check the Encrypt check box under
Security Options and click OK.
__5.
__6.
From the bottom right corner of the client, select the Online Admin location and enter the
password passw0rd
__7.
__8.
Switch to the People & Groups tab and click on the People view.
__9.
Page 34
IBM Software
__10.
From the Tools navigator, select Extract ID from Vault from the ID Vaults section.
If the ID was being extracted so that a physical copy can be given to the user, and the vault
administrator performing the task did not have the Auditor role, the current password for the ID would
have to be supplied here. This means that either the user would have to have given the administrator
the current password or the administrator would have had to have reset the password to something that
he/she would then know. In either of these cases, the user would be aware an activity had been
performed against their ID.
As sadmin has the Auditor role, a password does not need to be supplied in this dialog.
__11.
__12.
Note
This password is for this copy of the ID only and does not
affect the copy in the vault and therefore no copy in use
by the user.
__13.
Lab 2
Page 35
IBM Software
__14.
__15.
__16.
You should see the message indicating that the document is encrypted and not intended for you.
__17.
Click OK. Notice that the email opens but you are not able to read the contents.
__18.
__19.
__20.
__21.
__22.
__23.
__24.
__25.
__26.
Open the mail file and the encrypted document. Note that you can now see the contents of the
mail message.
__27.
__28.
Login with New User1's password newpassw0rd and notice that this is still valid and does not
require changing.
If you open New User1's mail file you will notice that the encrypted mail message now shows as having
been read. In a real audit scenario, it is more likely that a copy of the required application would be
made so that any action by the auditor would not be visible to the users.
2.1.9
In this step we will show what can happen in the situation where a user leaves the organization but their
ID needs to be securely retained for audit or information retrieval purposes. We need to use our New
User1 identity in the next exercise so in this step we will remove the account of New User2.
Page 36
IBM Software
__1.
__2.
__3.
Select the People & Groups tab and then the People view
__4.
__5.
From the Tools navigator, select Delete from the People section.
Note the option to mark the ID as inactive but keep in the vault.
Lab 2
Page 37
IBM Software
__6.
__7.
Switch to the Files tab and open the Demo vault database. Notice that the New User2's record
is no longer in the Vault Users view.
__8.
Click on the Inactive User IDs view and you should see the New User1's ID record.
2.1.10
In this step we look at how the various actions on the vault and the IDs within it are recorded.
__1.
__2.
__3.
Page 38
IBM Software
You should be able to see all the key vault associated activities including
2.1.11
__a.
Vault Creation
__b.
Upload of ID to the vault (note that this activity is not well recorded yet where you see
an Unable to find ID... Error: Entry not found in index message directly before an ID
successfully synchronized with vault message for the same user, this is an indication
that the ID has been uploaded. Log entries for this activity will be improved in the next
release.)
__c.
__d.
__e.
Password reset
__f.
Summary
In this section of the lab we looked at the new Notes ID Vault feature. We deployed an ID vault and
investigated what was involved in uploading ID files from existing users as well as storing ID files in the
vault during new user registration. We also explored some of the common ID-related tasks associated
with the ID vault such as managing password changes across multiple IDs, resetting forgotten
passwords, managing auditor access to IDs and deleting users from the organization. Finally we looked
at the audit trail recording the various vault-related activities.
2.2
Notes shared login allows users to start Lotus Notes and use their Notes IDs without having to provide
Notes passwords. Instead, they only need to log in to Microsoft Windows using their Windows
passwords.
This is not the same mechanism as Notes single login, a feature that was introduced in a previous
version of Notes. Notes single login was a method of synchronizing the Windows and Notes
passwords, Notes shared login removes the need for a Notes password altogether.
Enabling an ID for Notes shared login alters it so the ID works only on the computer on which the feature
is activated. This is because the feature relies on a Windows security infrastructure specific to that
computer.
With Notes shared login users only need to remember their Windows passwords and administrators are
not required to manage Notes passwords or assist users who have forgotten their passwords because
there are no longer Notes passwords to manage!
Notes shared login works without interruption when Windows passwords are changed either by users or
by administrators on a Windows domain controller.
2.2.1
Lab 2
Page 39
IBM Software
__2.
__3.
__4.
Select File > Security > User Security from the menu
__5.
Note the option to login to Notes using the operating system login is greyed out. This is because this
feature is disabled by default.
__6.
__7.
__8.
Open the DemoVault settings document. Since Notes ID vault and Notes Shared Login can
work together we will configure them through the same policy.
__9.
Select the Password Management tab and then the Notes Shared Login tab.In this lab we
are going to configure Notes Shared Login to be turned on by default and not allow the user to
change this.
__10.
__11.
Page 40
Yes
No
System dialog
System dialog
IBM Software
__12.
__13.
__14.
__15.
Select Online New User1 as the location document and enter newpassw0rd as password.
__16.
Troubleshooting
If the message does not appear after a short while try
starting up the Domino Admin client this may kick it into
action
__17.
__18.
Select File > Security > User Security from the menu
Notice that you are no longer prompted for your Notes password as you try to access a secured area of
the client. Instead you are prompted for the operating system password of the Windows account with
which you are logged in.
Lab 2
Page 41
IBM Software
__19.
Enter the windows password for sadmin which is passw0rd and click Login
Notice that the options under Your ID Settings have changed. The option to login to Notes using the
operating system login is now selected and not greyed out and the option for synchronizing your Notes
password with your HTTP password and suppressing password prompts from other Notes-based
programs are no longer displayed. Neither of these are compatible with Notes Shared Login as there is
no longer a password associated with the Notes ID that you are now using with the Lotus Notes 8.5
client.
__20.
Restart the Notes client and notice that you are no longer prompted for a password.
2.2.2
Once Notes Shared Login has been enabled, the ID cannot be copied via operating system mechanisms
and used on another client. Enabling an ID for Notes shared login alters the ID so that it only works on
the computer on which the feature was activated. This is because the feature relies on a Windows
security infrastructure specific to that computer. In this step we will show how a user can create a copy
of their ID for use on another client.
__1.
Select File > Security > User Security from the menu and enter the windows password
passw0rd.
__2.
Page 42
IBM Software
__3.
Save the new copy in the same directory as the original ID with the file name user-newcopy.id
Note that you are now prompted to set a password on this new copy to protect it during the transfer to
another computer.
__4.
__5.
__6.
Click OK again on the dialog confirming the creation of the password protected ID
__7.
Because we no longer have a Notes login prompt we don't have the opportunity to select a location on
Notes client start-up. To re-instate a prompt we have to switch to a new location and then shut down the
Notes client.
__8.
__9.
__10.
__11.
Restart Notes.
__12.
Leave the location selected as Online Samantha but click on the arrow next to the user
identity and select Other
Lab 2
Page 43
IBM Software
__13.
Navigate to the C:\Lotus\Notes\Data directory and select user-newcopy.id and click Open
__14.
Enter the password copypassw0rd and click Login. Note that although New User1 won't be
directed to the correct mail file when using this location, we won't be using mail in this step and
this anomaly should not matter.
__15.
After a short while you should see the message telling you that Notes Shared Login has been
implemented for this new ID copy.
__16.
Before exiting the Notes client make sure that you switch back to the Online New User1
location.
2.2.3
Even though there is now no Notes password associated with the ID, it is still possible to store the ID
securely in the vault. In this step we will show how the ID is still secured. With the Notes ID Vault we
showed how it was possible to resolve an ID corruption by removing the affected file and downloading a
new copy from the vault. This worked as long as we entered the correct password for the ID in the vault.
Let's see what happens now that we don't have a password associated with our ID.
__1.
Shut down any Notes or Domino Administrator clients that are currently open
__2.
Double-click on the Domino85 Computer icon on the desktop and navigate to the C:\Lotus
\Notes\Data directory.
__3.
__4.
Note that, because the client cannot locate the ID file, it has returned you to the login dialog. If the user
can remember the password that was set on the ID at the time that Notes Shared Login was enabled,
they can enter this or, if not, they will need to contact the HelpDesk to have the password reset.
__5.
You should login successfully and within a short while Notes Shared Login will be re-enabled.
2.2.4
In this step we will demonstrate what happens when Notes Shared Login is disabled.
Page 44
IBM Software
__1.
__2.
__3.
__4.
__5.
Open the DemoVault setting and change to the Password Management > Notes Shared
Login tab.
__6.
Edit the policy settings document and set Enable Notes shared login with operating system
to No
__7.
__8.
Switch the location to Online New User1 and then close the Notes client.
__9.
You should be logged in without being prompted for a password as Notes Shared Login is still enabled
at the moment
__10.
Troubleshooting
As before, if the message does not appear after a short
while try starting up the Domino Admin client.
__11.
__12.
__13.
__14.
Lab 2
Page 45
IBM Software
__15.
You should then see the following dialog indicating that Notes Shared Login is now disabled
and you will need to use a password with your ID from now on.
__16.
Restart Lotus Notes and note that you are now prompted for your password again.
2.2.5
Summary
In this section of the lab we looked at the new Notes Shared Login feature. We enabled the feature and
investigated how multiple IDs could be managed and how the feature works with the Notes ID vault.
2.3
Summary
In this lab, the workshop participant has examined the new identity management features introduced in
Notes/Domino 8.5 and has successfully completed a review of both the Notes ID vault and Notes Shared
Login.
Page 46
IBM Software
File -> Open and navigate to and open the Lotus_Protector_for_Mail_Security.vmx virtual machine.
The Domino VM should disappear (don't worry, it's still running) and the Settings screen for the Protector
VM should appear. The settings that you see have been modified slightly from the standard download
so that things will work in this environment. Power up the VM by pressing the green power button in the
tool.
Lab 3
Page 47
IBM Software
Note
The instructions and screenshots listed in chapter 3.1 are
included for reference purposes only and are actually not
an interactive part of this lab exercise. The first steps to
be carried out by the PoT attendants start with chapter
3.2, which also includes detailed instructions on what to
do with the additional Lotus Protector VMware.
3.1
The initial configuration steps for protector are not very interesting, but they are time-consuming due to
the amount of data that needs to be downloaded. They have been done for you here, and this series of
screenshots and explanations have been included for reference.
3.1.1
Initial boot
When the Protector VM first starts up, you'll eventually see a login screen indicating that the VM is in an
unconfigured state. Log in using admin as both the username and the password.
Page 48
IBM Software
You'll get the HTTP authorization screen next, which is pre-filled with admin/admin. Tab twice to
navigate to and highlight OK and press Enter. Review the Welcome screen and press Enter to
proceed.
Lab 3
Page 49
IBM Software
Next, we need to configure a hostname for the image. Use Backspace to delete the existing text, then
replace it with protector.demoibm.com and tab to Next and press Enter. In the real world, this name
will probably be whatever is published as the DNS MX record for your organization (mail.company.com)
Page 50
IBM Software
On the Network Configuration screen, Tab to Next and press Return to leave the selection at DHCP. In
the real world, you must use a static IP for a mail exchange host.
For the DNS servers, leave the selection on Automatically Configure and Tab to Next and press
Enter.
Lab 3
Page 51
IBM Software
Next, set up a password for the Linux root user. Use passw0rd.
Page 52
IBM Software
Next is the admin password, which is used for the Web Management Interface. Select the box for
Same as root by highlighting the field (if it isn't already) and pressing the SpaceBar, then proceed.
Lab 3
Page 53
IBM Software
Page 54
IBM Software
Finally, press Escape to exit the setup process and return to the login screen. Protector is now
configured enough to access the network, but not enough to do any real work. Log in as root, with the
password that you selected, and enter ifconfig eth1 at the command prompt.
Lab 3
Page 55
IBM Software
Note the newly assigned address, inet addr: 192.168.18.134 in this case. Switch to a client PC and
start a browser that has a JRE (Java Runtime Environment) installed. Naviage to the https address of
your Protector VM. The browser may you give you a certificate error. Ignore this, and proceed to the
site. Login with admin and your password. If you're told that someone else is already connected, selet
the option to disconnect the other user. If you get a Java security warning, select the option to always
trust content from this publisher and click Yes. Log in again with admin and your password. This will
take you to the initial setup assistant.
Page 56
IBM Software
Click Next to begin, and then agree to the License Agreement and the Export Restrictions. This will
take you to the Configuration Methods screen, where you can choose to exit the assistant and continue
manually, should you so desire. Click Next on this screen to continue with the assistant. If you have
license keys, their installation is next.
Lab 3
Page 57
IBM Software
The password configuration screen is next. Passwords were already selected during the console
configuration, but this screen gives you a chance to change them.
Page 58
IBM Software
Network configuration is next which, again, we did in the console configuration steps. Click Next again
to get to the SMTP configuration tab. This is where we start getting to the real configuration of
Protector.
For the root domain, we've used demoibm.com to match the Domino server environment. And we've
changed the postmaster address to sadmin@demoibm.com so that errors will go to the Domino
Administrator's account.
For Local Domains we've entered demoibm.com=192.168.18.131 but this will need to be changed
later to match your individual network settings. This is the internal machine(s) that Protector will route
inbound mail TO.
Lab 3
Page 59
IBM Software
The rest of the options on this screen can be left as-is, and you can click Next. For Alerts, we've
selected everything to be sent to sadmin@demoibm.com and specificied the IP address of the server.
Again, this is specific to our environment, so you should use settings here that are appropriate for yours.
Page 60
IBM Software
Lab 3
Page 61
IBM Software
The management console will automatically go to the Updates page, where it will display an error for the
Content Filter Database. If you have an internet connection, click the Update button to connect to IBM
and download the current filtering database. Your appliance will not work without this database.
(Technically, it will work it just won't mark anything as spam unless there is a specific rule for it.) This
update could take a while. Take a break while the updates load. (This is why we're not doing this as part
of the live lab for the Proof of Technology.)
The update will download and self-install. That covers the initial configuration of Lotus Protector, and
what has been done to the VM to prepare for the following lab.
3.2
First, we have to prepare the VMware image for the Domino server. We will then start Domino and make
sure the proper tasks are running.
Page 62
IBM Software
__1.
If you are currently running the Domino server VM in full-screen mode (there are no window
controls visible in the upper-right corner, and you can only see the Lotus Notes & Domino
desktop, you need to exit full-screen mode. Ctrl-Alt is the keystroke shortcut for doing this. You
should now see a toolbar at the top, with window control icons on the right. Mouse-over each to
see the description, and click the center one for Iconify the Window. VMWare should now be
running in a traditional window, with menu- and toolbars at the top.
__2.
Pull down the VM menu and select Settings. You'll see a new window displaying the settings
for the virtual machine
Lab 3
Page 63
IBM Software
__3.
Verify that the Network Adapter is set to NAT, as shown. If it is, click the Cancel button. If it's
not, change it and click the Save button.
__4.
Open a command prompt window (use the icon on the desktop) and type ipconfig /release
followed by ipconfig /renew. Make note of the resulting IP address. In this case, it's
192.168.18.131. Note the ip address of your system here:
domino85.demoibm.com ____________________________
Page 64
IBM Software
__5.
If Domino is running, restart it by typing restart server in the console window. If it's not
running, launch it as an application using the desktop icon.
__6.
Verify that the SMTP task is started you will see messages as the server loads, or after the
server is running, you can issue the show tasks command from the console and check that
SMTP is loaded and running.
__7.
After you have started the server, start the Notes client. The sadmin userid and online location
should be selected, and you should be prompted for the password, which is passw0rd.
__8.
Open the demoibm directory database names.nsf the Name and Address book for the server.
From the People view, open the person document for Natalie Olmos. Note that her mail server
is domino85/demoibm and her internet address is nolmos@demoibm.com
__9.
We are going to send Natalie a test email through SMTP, to ensure that routing is working. To
do this, we're going to telnet directly to the listening SMTP port 25 on the Domino server and
manually create and send an email message. Switch over to your command prompt window,
and type telnet domino85.demoibm.com 25. You should see a greeting banner if not,
press Enter once and you should see this:
Lab 3
Page 65
IBM Software
__10.
The next step of an SMTP conversation involves greeting the server. You can either say helo
or use the newer, extended format of ehlo (extended hello). Once you say hello, you should
get an acknowledgement. Some SMTP servers will follow this with a list of commands that they
understand. Type ehlo domino85.demoibm.com
__11.
Now, we write the message. First, identify the sender. You dont really need to use an actual
userid, but if you want to get failure messages, it would be helpful. (Using someone elses email
address means they will get any error messages. This is why sometimes you might get
messages that are obviously aimed at spammers.) Type mail from:
<sadmin@demoibm.com> and press Enter. Be careful typing, as deleting an error with the
Backspace key will send characters that SMTP doesn't understand, and will error out the
session. You should get a response as shown:
Page 66
IBM Software
__12.
If you get the OK response, you next specify the recipient. To have a valid test, this should be
a valid user on the mail server (otherwise, it cant be delivered.) You can specify a user on
another mail server entirely, and some servers will forward the message on. This is known as
an open relay and it is the basis of spam generation. Open relays are evil. By default, Domino
mail servers are not an open relay. Type rcpt to: <nolmos@demoibm.com> and press
Enter.
__13.
Now the server knows who the message is coming from, and where it's going. Next, its time to
actually send the message itself. The message body starts with the data command followed
by an Enter keystroke, and ends with a period (.) on a line by itself. You can enter anything
you like in the body. You will not see any acknowledgements from the server until you enter the
period to close the message. As you might expect, pressing Enter generates a new line in the
telnet session.
Lab 3
Page 67
IBM Software
__14.
Once you enter the period, you should see an acknowledgement of the message, and it is
routed. If you can watch the console of your Domino server, you should see the message
received and routed (assuming you sent it to a valid user.)
__15.
Bring up the Notes client, switch to the Natalie-Online location, and verify that the new mail
message has been received.
__16.
Quit the telnet session by entering the Ctrl-] keystroke combination. That should bring you
back to a Telnet> prompt, and you can then type quit to return to a normal command prompt.
__17.
One final step before we switch over to further configuration of Protector we need to ensure
that LDAP is running. In the command-prompt window again, type cd c:\Lotus\Notes to
change in to the Notes program directory, then type ldapsearch -h domino85.demoibm.com
uid=sadmin. You should get the person record echoed on the screen. If so, LDAP is
configured properly and is running.
Page 68
IBM Software
3.3
__1.
Leave the Domino VM running, and do a File -> Open in the VMWare window. Navigate to and
select the Lotus_Protector_for_Mail_Security.vmx file, select it, and click the Open button.
Verify that Network Adapter 2 is set to NAT, and then power up the VM by clicking the geen
arrow toolbar button. At the login prompt, log in as root with the password of passw0rd. Type
ifconfig eth1 and press enter to get IP address information for the Protector Server. In this
example, it's 192.168.18.134. Note the IP address here:
Protector.demoibm.com ___________________________
Lab 3
Page 69
IBM Software
__2.
Page 70
You'll need to make some modifications to the Protector settings to match the IP configuration
of your lab setup. Switch back to the Domino VM by pulling down the Tabs menu in VMWare
and selecting the Domino VM. Start IE and navigate to https://your.protector.IPaddress.
Acknowledge any security warnings, allow the installation of any software, and login with the
credentials of admin/passw0rd. If you get a notification that the admin session is locked, click
the button to terminate the other session and proceed. You'll land on the Protector homepage.
IBM Software
__3.
Lab 3
The tabs across the top should show all green status lights, with the exception of Updates,
which will probably be yellow red, depending on how out-of-date the installed configuration
database is. No worries about that for now. Expand the SMTP section and select the
Configuration subsection.
Page 71
IBM Software
__4.
On the Global tab, verify that the Root Domain is set to demoibm.com, and that the first three
listed email addresses are sadmin@demoibm.com. You can change the last two to match, if
you'd like, but it's not important right now. Then click the Receiving SMTP tab and scroll down
so that you can see the Local Domains section.
__5.
The only local domain that should be listed is demoibm.com. The IP address listed in the Mail
Server column may not match that of your Domino85 server, as noted earlier in section 3.2 step
4. If it doesn't, click the row entry for demoibm.com and then click the pencil icon to edit the
entry. Enter the proper data, then click OK and then click the button for Save Changes.
Page 72
IBM Software
__6.
Lab 3
Next, lets actually set up some mail security rules. Expand the Mail Security tree entry and
select Policy. The selected tab should be Settings and the selected subtab should be Rules.
These are the rules that are executed as mail is processed. There are a couple of rules that we
will use to test our installation. Uncheck Tag Spam. Rather than tagging spam, we are going
to send any spam detected to a quarantine. Check Quarantine Spam. It makes little sense to
tag and quarantine, so a site will generally do one or the other. Check MyMail. This is a test
rule that marks any mail that has MyMail in the subject line. Your screen should match this
when you're done. Click the Save Changes button.
Page 73
IBM Software
__7.
Click the User Access List subtab. Change the Default Access Mode to Granted and click
the Save Changes button. This allows all users to view their quarantine from a web browser.
__8.
Next, we configure Protector to connect to the Domino LDAP server. Click on Policy Objects
in the left-hand menu tree and then click the Directories tab. Select the Domino Example
Domain in the list and click the Pencil icon to edit it.
Page 74
IBM Software
__9.
Lab 3
On the Edit screen, click the checkbox next to Active and change the name to DemoIBM. For
the Host field on the LDAP Server tab, enter the IP address of your Domino server. Enter
sadmin for the username and then click the Enter Password button. Enter passw0rd in both
fields, and click OK to close the window and then Save Changes.
Page 75
IBM Software
__10.
Page 76
Next, click the Who tab and then click the plus icon to add an entry. Make sure that the Active
checkbox is selected, and add DemoIBM in the Name field. Change the Type to Directory and
then choose DemoIBM in the drop-down.
IBM Software
__11.
Click OK and then Save Changes, then select Verify Who Objects in the left-hand menu.
Leave the selection of All Who Objects and click the Submit button.
__12.
Lab 3
Page 77
IBM Software
__13.
Now, we can route mail through Protector. Switch to your command-prompt window and start
another telnet session, but this time, connect directly to the Protector server. Telnet
protector.server.IPaddress 25 and greet the server with an ehlo protector.demoibm.com
__14.
Page 78
IBM Software
__15.
data followed by an Enter keystroke, then Subject: test message through protector followed
by another Enter keystroke. Add in whatever message data you like, and close the
communication with a . character.
__16.
Repeat the process, but this time include the text MyMail somewhere in the subject line of the
message. This will trigger the rule that you enabled earlier.
__17.
If Protector sees an email message with a subject containing MyMail it will re-write the subject
line, starting it with MyMail found in. Switch to the Notes client and Natalie's location, and
open mail. You should see the messages that we just sent, with the re-written subject line on
the MyMail message.
Lab 3
Page 79
IBM Software
__18.
Page 80
It may take a few minutes for everything to route through. If things seem stuck, go back to the
Protector web console, expand SMTP, and select the Queue Browser. Check each queue for
stuck messages and check the log details for each one for troubleshooting purposes.
IBM Software
__19.
The last step, once routing is working through Protector, is to lock down the Domino server so
that it won't accept SMPT mail from other sources. From the Notes client, switch to the Admin
location and open names.nsf on Domino85/demoibm. Expend the Configuration section,
expand Servers, and click the Configurations subsection.
__20.
Edit the configuration document for the Domino85 server. (In the real world, you'd edit the
config doc for All Servers, but it takes a while for those changes to apply to other servers, and
we don't want to wait, so we'll edit the Domino85 config doc directly.)
__21.
Click the Router/SMTP tab, then the Restrictions and Controls tab, then the SMTP Inbound
Controls tab. Scroll down to the Inbound Connection Controls section. In the Allow
Connections only from the following SMTP internet hostnames/IP addresses field, enter
the IP address of your Lotus Protector appliance.
Lab 3
Page 81
IBM Software
__22.
Click the Save and Close button, then restart the Domino server by typing restart server in the
console window, followed by a Return keystroke.
__23.
Once the server is back up, switch to your command prompt again and telnet
domino85.demoibm.com 25
__24.
ehlo domino85.demoibm.com
__25.
__26.
Now that everything is working, let's do some more work with rules. Rules are defined in the
Mail Security section, under Policy. Open the management console at https://
protector.server.name and you should see Mail Security as the second option in the menu.
Expand it, and select Policy. There are a number of predefined rules that ship with the product.
Two are contradictory Tag Spam and Quarantine Spam. If the Tag Spam rule is activated, all
mail determined to be spam has its subject changed to mark it as spam. The mail is then
delivered to the recipient. This saves space on the Protector appliance, since mail is not saved
it is delivered. If the Quarantine Spam rule is activated, mail determined to be spam is saved
in the quarantine folder on the appliance. Mail in the quarantine is deleted on a timer. It makes
no sense to tag spam and then quarantine it, as well. Make sure only one of these rules is
active at any given time.
__27.
You can create custom rules to handle specific situations in your enterprise. In this example we
will write a rule to tag all mail that comes from IBM. To create a new rule, press the plus sign on
the rules panel (all the buttons are on the top right row.) For the name, enter Mail from IBM.
You may also enter a comment to describe the rule.
Page 82
IBM Software
__28.
Lab 3
Pre Conditions are conditions that are met before the mail begins processing the
defaults are spam detected and binary detected. Our IBM rule has no preconditions.
Senders define who sent the mail. If you are trying to identify mail by source, this
would be the portion of the rule you would use. You can verify that the sender is in
your Domino Directory or that it is a valid email address. To do matching, you would
use an analysis module (below.)
Recipients define who receives the mail. If you are filtering by source (say all the mail
to the marketing department), this would be where that condition is defined.
Whens defines a time period during the day when this rule is in effect. This probably
only makes sense for outbound mail spam can arrive at any time!
Analysis Modules define the modules used to filter the mail. These can be standard
modules included with the appliance, or you may create your own. We will create our
own for the IBM rule.
Responses define what happens when the rule conditions are met. If the mail passes
the tests, the response is applied.
Action determines what happens next. After the rule completes, mail can be allowed
which sends it on, blocked which quarantines it, continue which continues to the
next rule or left blank, which deletes the mail.
For our rule, we will check the sender with an Analysis Module and define a Response. Rightclick in the box under Analysis Modules. We will add new analysis modules, so select that
option from the menu. (Later, you can edit your modules, if need be.)
Page 83
IBM Software
__29.
Page 84
In the pop-up dialog, name your module IBM Email Address. Enter a comment if you wish. In
the Analysis Module drop-down, select Message Field Check. For the Field Name, select
From. (Note that many of the fields available in an email are available here as options.) As the
Expression, enter *.ibm.com - this will match any domain within IBM. For Match Mode,
choose Regular Expression. This is important literal string will not match! Click OK to
return to the rule.
IBM Software
__30.
Lab 3
Now, we have to define a response. This rule will fire whenever an email has a From field that
contains anything.ibm.com in the value. We want to mark this mail so we know it came from
IBM. Right-click on the Response field and Add New Responses. Name the response Tag
IBM Mail. We will modify a field, which is the default. In the Field drop-down, choose Subject.
For the value, enter An IBMer sent and then from the arrow at the right, choose Email
Macros, and choose $(MSG.<field>). Replace <field> with SUBJECT and add a space before
the $. Your value should be An IBMer sent $(MSG.SUBJECT). Click OK.
Page 85
IBM Software
__31.
For the Action, choose Continue (which should be the default.) At the far left of the rule, make
sure the Enable check box is checked. Click Save Changes. You have now created a rule. If
you want to test this rule, send an email using the manual steps, through the protector server, to
nolmos@demoibm.com but specify a from address of somebody@someplace.ibm.com. The
subject line should be altered.
__32.
A more useful example: Let's say that your enterprise wants to be able to block emails that are
not work-appropriate. We're going to make sure that users aren't spending time trying to buy
items at online auctions or trying to find new jobs. Create a new rule. Name it Wasting Time
Check. Right-click on Recipients and Add new Recipients. Enter a name. For Type, select
Directory, and then select the Domino Directory you set up earlier. Click OK.
__33.
Add an Analysis Module. You want to add URL Check. Name the module whatever you
would like and choose URL Check from the drop-down. There are a number of categories and
subcategories available. You would choose whichever would be appropriate for your needs.
Make sure you also look at the subcategories to further determine which mail is filtered. Expand
Ordering. We will just block auctions/classified ads, so select that box. Also expand Job
Search. It only has one subcategory. Click to select it. Click OK.
Page 86
IBM Software
__34.
Now, define responses. If someone is bidding at an auction or looking for a job, we want to
quarantine the mail and warn the user.
__35.
Add a new Response, and name it Warning. Change the Response to Add Disclaimer.
Position it at the top. In the Text field, write This message possibly violates business conduct
guidelines. Click OK.
__36.
Add another Response. Name it Quarantine. In the drop-down, choose Store. For the folder,
choose Quarantine Store. For message-type, choose Current Message so the changes are
sent. Click OK.
__37.
For the action, choose Block. Enable the rule. Save your changes.
__38.
We can't test the rule for real here but to do it, you'd use an account in the Domino Directory,
sign up for an auction site, such as Craig's List (www.craigslist.com.) After the website says a
message has been sent to activate the account, wait a moment or two, and then check the
quarantine. You should see the message there. Click on the message in the quarantine. You
should see your disclaimer at the top of the text. Release the message and it will be delivered.
Lab 3
Page 87
IBM Software
4.1
__1.
If the Domino server is running, shut it down now (enter q or quit in the console window).
__2.
Locate the self-extracting Traveler85.exe file under C:\LabFiles and launch it (double-click).
Page 88
IBM Software
__3.
__4.
On the Welcome screen, you can optionally click to view the Info Center or click Next to
proceed with the installation.
Important!
Viewing the Info Center requires an Internet connection,
which may or may not be available for your Proof of
Technology..
__5.
Lab 4
Page 89
IBM Software
__6.
Take the default selection (Complete) as we will be installing all components. Click Next.
__7.
Take the default values for the installation paths. Click Next.
Page 90
IBM Software
__8.
__9.
Leave the default selection checked for setting the client download site as the home page.
Click Next.
Lab 4
Page 91
IBM Software
__10.
__11.
Wait for the installation to complete. This will take a few minutes.
Page 92
IBM Software
__12.
Upon successful completion, the following screen should be displayed. If you have an Internet
connection, leave the box checked to view the Info Center in your browser. Otherwise, deselect
it and click Done.
__13.
Start the Lotus Domino server from the icon on the desktop, selecting Application again, and
not Service.
__14.
Now watch the Domino server console and observe the Traveler service starting up. When
everything is started properly, you should see a message showing that the Traveler server is
started.
Lab 4
Page 93
IBM Software
4.2
In this section of the lab exercise we will install the Notes Traveler client using a Windows Mobile 5
device emulator.
__1.
Launch the Windows Mobile 5.0 Device Emulator Manager by clicking Start > Programs >
Microsoft Windows Mobile 5.0 MSFP Emulator Images > Device Emulator Manager.
__2.
Launch the Pocket PC device emulator by clicking Start > Programs > Microsoft Windows
Mobile 5.0 MSFP Emulator Images > Pocket PC Savestate.
__3.
Go to the Device Emulator Manager and click Refresh, then highlight the entry that shows up
Page 94
IBM Software
__5.
__6.
Lab 4
Page 95
IBM Software
__7.
Page 96
Click Finish to complete the wizard. At this point you should see an indication that the device is
connected in ActiveSync.
IBM Software
__8.
Lab 4
In the Pocket PC emulator window, the browser should be open (if not, launch Pocket Internet
Explorer from the Start pull-down). Click on the word "Favorites" in the bottom left. Select
"Lotus Domino Web Server".
Page 97
IBM Software
__9.
The Notes Traveler client download page should display. Click on the first entry to install the
client on Windows Mobile 5.0 Pocket PC. Select
__10.
On the pop-up prompt, leave the box checked and click Yes to begin the client download and
installation of the .cab file on the PDA. Note: This will take a few minutes.
Page 98
IBM Software
You can monitor the download using the progress bar shown below.
Lab 4
Page 99
IBM Software
__11.
Upon successful installation completion, the Configuration Wizard will display. Click Next.
__12.
Enter Natalie Olmos and passw0rd for the userid and password, and
domino85.demoibm.com for the server name. (Note that this screenshot was taken from a
different lab environment, and shows a different server name). Click Advanced.
Page 100
IBM Software
__13.
Here you can see the network settings used for synchronization with the server. Note that the
values can be changed to suit a customers environment. We will take the defaults. Click Done
and then Next.
__14.
After the device registers with the server, you will see four application categories that can be
selected for synchronization. Leave all of them selected (default) and click Next.
Lab 4
Page 101
IBM Software
__15.
The client is now configured and ready to synchronize with the server. Click Finish.
__16.
The software is now installed. Click OK (upper right corner) to close the browser and return to
the Today screen.
Page 102
IBM Software
4.3
In this section of the lab we will explore and configure the Lotus Notes Traveler client.
__1.
Lab 4
On the Today (desktop) screen, notice the Traveler (round orange and yellow) icon in the lower
right corner. The icon shows the status of the client. A yellow lightning bolt indicates that the
client is connecting properly with the server, but is not currently synchronizing. If the lightning
bolt were green, that would indicate that synchronization is currently? in progress. We could
click this icon to open the user interface, but we wont this time.
Page 103
IBM Software
__2.
Note that, in the Programs folder, in addition to Traveler, there is also a tool for submitting a problem
report that is included with the client (Lotus Traveler PR). Click the Lotus Traveler icon to launch the
user interface. (See image above.)
Page 104
IBM Software
__3.
The Traveler status screen also allows access to settings and the log. Click Menu > Settings.
__4.
Lab 4
Page 105
IBM Software
__5.
__6.
Page 106
IBM Software
__7.
__8.
Lab 4
Page 107
IBM Software
__9.
From the menu, select Other Applications. Note the defaults and options you can change.
Click Done.
Page 108
IBM Software
__10.
Lab 4
From the menu, select Auto Sync and note the defaults. Using SMS notification can be used
to conserve battery power (keep TCP selected for this lab, as we dont have a device that
supports SMS for this lab). Change the battery level threshold if you like. Click Done.
Page 109
IBM Software
__11.
From the menu, select Logging and note the defaults. Change the logging Level to High. Click
Done twice.
Page 110
IBM Software
__12.
Lab 4
From the status screen, click Menu > Tools > Report Problem. Note the pull-down topic
selection description field. You can also paste information here from the log. Click Cancel.
Page 111
IBM Software
__13.
From the status screen, click Menu > Tools > Replace Data. This can be used to completely
overwrite one or more categories of data on the device with the servers copy. Click Cancel.
__14.
From the status screen, click Menu > Tools > View Log.
Page 112
IBM Software
__15.
Look at the most recent entries in the log. You should see some like the ones shown below
(you may have to scroll up to see all of the entries). Later in the lab, go back and look at the log
to see all of the detailed information that is captured for each synchronization. Close the
browser window then click Done on the status screen. Close the Programs folder, if it is open.
4.4
In this section of the lab we will work with applications on the PDA and synchronize data with the Domino
server.
Lab 4
Page 113
IBM Software
__1.
From the Today screen, click Start > Messaging. You should see Natalies inbox. Open one
of the messages and then close it with OK (upper right corner). Notice that opened items
appear differently from unopened ones (the envelope icon changes and the subject text
changes from bold to regular.) Click Inbox in the upper left.
Page 114
IBM Software
__2.
Lab 4
Notice that Traveler maintains separate folders from Outlook which appears below. Click Show
to return to the inbox.
Page 115
IBM Software
__3.
Open one of the messages from Ling Shin and compose a reply. Click Send when finished.
Page 116
IBM Software
__4.
Lab 4
Click Start > Calendar to open up the calendar. Click Day then Week so the week view
appears. Note that Traveler supports repeating meetings.
Page 117
IBM Software
__5.
Click Menu > New Appointment. Choose a subject then click Attendees. Select Ling Shin
from the contacts list and click OK in the upper right corner.
Page 118
IBM Software
__6.
Click OK to create the calendar entry (you can cycle through Day/Month/Year views if you
want).
__7.
Click Start > Contacts and click on Ling Shin. Then click Send e-mail > Lotus Traveler Mail.
Lab 4
Page 119
IBM Software
__8.
Compose an email message and click Menu > Insert > File.
__9.
Choose the Flower jpeg as a file attachment. Click Send then OK.
Page 120
IBM Software
__10.
Send some additional emails and calendar invitations to Ling Shin and optionally create some
new contacts and/or tasks.
__11.
Start the Lotus Notes 8.5 client from the icon on the desktop.
__12.
Lab 4
Page 121
IBM Software
__13.
Open Lings mail and calendar and look for the email and calendar items sent by Samantha
using Lotus Notes Traveler. Experiment by creating some replies, new messages (with and
without attachments), contacts and calendar entries (both repeating and non-repeating). Go
back and forth between Lings Notes 8.5 client and Samanthas PDA with the Notes Traveler
client. Accept the calendar invites between these two users and test out changing some of the
filter settings we looked at earlier in the lab.
__14.
Note that when new messages arrive at the server or are created on the PDA, the Auto Sync
mechanism attempts to synchronize. Each time new messages arrive on the device, an alert
message (visual/audible) is generated, informing the user. The alerts are customizable.
__15.
Extra credit: Open the Domino Administrator and modify some of the policy and other settings
that affect the way Lotus Notes Traveler operates.
__16.
More extra credit: Try to modify the alert sound that Notes Traveler uses on the PDA.
4.5
Summary
In this lab exercise, we followed the processes involved with installing the Lotus Notes Traveler service
on Domino 8.5 and deploying the client to a Windows Mobile 5.0 device. We then explored the client
configuration options and tested various aspects of synchronizing e-mail, calendar and contacts using
Lotus Notes Traveler.
Page 122
IBM Software
5.1
In this section you will be creating a Management database. This database will later be used to create a
way for a website owner (named Homer) to edit his website while he is on the web. It will give you a
glance over preview of what the new face of Domino Designer 8.5 looks like.
5.1.1
__1.
Start the Lotus Domino Server through the icon on your desktop.
__2.
Select the radio option Start Domino as a regular application and click OK.
__3.
Lab 5
Page 123
IBM Software
5.1.2
__1.
Open the Lotus Domino Designer with the icon on your desktop. Depending on which location
was last in use in Notes, you may or may not be prompted for a password if NSL was enabled.
If you are prompted to login, select the Online Admin location and log in with the password
passw0rd (the o in password is a zero). If you're not, switch to the Online-Admin location after
the Designer starts.
__2.
5.1.3
Creating an Application
__1.
Page 124
IBM Software
__2.
Select the Domino85 server and pick a title of your choice for the new application. The title will
fill in automatically with a variation of the entered title.
__3.
__4.
__5.
__6.
__7.
Click OK, and wait a minute while the application is being created.
Lab 5
Page 125
IBM Software
__8.
Right click on the application in the view, and go to Application -> Access Control ...
__9.
Click Add and enter the name Anonymous. Give this user Editor access with Delete
documents permission and click Ok.
Page 126
IBM Software
5.2
In this Section you will edit the database created in section 1 and see some of the controls inside an
XPage to set it up similarly to how a Form could be used previously for web side editing. You will also
give several enhancements to some of Homer's content management tools.
5.2.1
__1.
Expand the XPage section under the application and double-click on the XPage PageEditor.
__2.
Click on the Window title menu, and select Open Perspective and select Other ...
__3.
__4.
Pull down the Window menu, select Show Eclipse Views, and then Data from the submenu.
Lab 5
Page 127
IBM Software
Perspectives are prepackaged sets and layouts of views: you can think of a perspective as a standard
GUI interface. Each panel you see for elements inside the designer is a view, and grants a unique
perspective into manipulating or managing the code and data. The flexibility to switch these
components around gives you the the ability to pick and choose your favorite aspects of various IDE's
(Interactive development Environment) and ball it up together as 1 IDE.
__5.
Enable the controls dialog box by clicking the button in the top left of the Data View. The X will
disappear and enable enhanced field options.
The Controls Dialog will allow you to change field types, labels, and add a default submission button
when adding fields through the Data View.
__6.
Click and drag Content from the Data View on the right to the table cell just to the left of the red
error message.
Page 128
IBM Software
__7.
Change the control type to Rich Text. In the Control column of the Select Data Bound
Controls window, click on Edit Box. This will change it to a drop-down menu, allowing you to
select Rich Text. This will enable the Dojo editor for true Rich text web content editing. Click
the OK button after you've made the change.
5.3
In this section you will see some of the various ways add style to your XPages. XPages have a built in
method to add stylesheets, apply classes to objects, and a classes assigned to specific object types
which can be directly accessed through the stylesheet.
5.3.1
__1.
Click on File -> Save, then click on the Preview in Web Browser icon.
Lab 5
Page 129
IBM Software
__2.
Click on the Cancel button at the bottom of the view to preview the existing List page.
5.3.2
__1.
Click on the Outline View in the bottom left corner, and highlight the XPage entry near the top
of the tree diagram by clicking on it once.
__2.
Just to the right you will see the Properties View. Click on the Style tab and scroll to the
bottom.
__3.
Click on the button titled Add Style Sheet to Page... Select Yellow.css and click OK.
Page 130
IBM Software
__4.
Do File -> Save again and then click the Preview in Browser button again. Notice the new
theme applied to the page.
__5.
Return to designer and under the applications view, expand Resources -> Style Sheets and
double click on Yellow.css.
__6.
__7.
Lab 5
Click on File->Save, then return to the web and refresh the page. You will notice the cancel
button has changed.
Page 131
IBM Software
__8.
__9.
__10.
Double check to make sure a label is selected and not the table cell. You can double check this
in the Outline View.
__11.
__12.
Click on .prompt under the Style selection. This will select the prompt class for the display of
this object. You can confirm this in the Designer View as you work.
__13.
__14.
Click on File-> Save, then return to the web and refresh the page. You should see the labels
having the same style as seen inside Designer.
Page 132
IBM Software
5.4
XPage Coding
In this section you will see a few additional methods added for developing XPages. In addition to the
standard object interfaced GUI Designer has been, a user can edit a mid level DXL rendering of the
objects. It is also important to note that @Formula can be used within JavaScript methods and
properties.
__1.
Return to the XPage PageList. You should note that the Design View inside an XPage has
both a Design and Source tab at the bottom of the view.
__2.
Highlight the View Site and Edit Locations links at the top of the view, and click on the source
tab to directly view the XML generated by the Design view.
__3.
Panels are synonymous with divs, and we want to float this div in the rendered html. Find the
<xp:panel> tag containing the highlighted text.
__4.
Find the style element of the tag and add the following style to the very beginning of the quoted
value:
float: left;
__5.
Return to the Design Tab and click on View: viewPanel1 in the Outline, click on Style, and
assign the .orangeBG class to the panel inside the Properties view.
Next we will be using formula within JavaScript to see how XPage values can be created with
@Formula.
Lab 5
Page 133
IBM Software
__6.
Click on the View Site link in the top left of the Design View.
__7.
__8.
Under the Options section, click on the diamond to the right of the URL radio option, and select
"Compute value... on the pop-up..
__9.
__10.
Click OK to continue.
__11.
Review this XPage on the web and see how the changes are seen.
Page 134
IBM Software
5.5
Summary
In this lab, the participant has learned some of the key features which are new to Notes Designer 8.5:
1. XPages Creating forms and pages similar to what was done previously with Pages and Forms.
2. Rendered XML - Fine tuning can be done to get code to appear as desired within the rendered
version of the GUI placed objects.
3. XHTML Architecture The object manipulation controls had style in mind from the onset of XPage
architecture.
Lab 5
Page 135
IBM Software
6.1
6.1.1
A Simple Example
__1.
Check that the Domino server is running. If not, start the Lotus Domino Server through the icon
on your desktop and select the radio option Start Domino as a regular application and click
OK.
__2.
For a simple starter example, you will build a composite application using pre-defined
components that ship with the Notes 8.5 client. Your sample application generates an email to
an entry you select in your name and address book.
__3.
Open the Notes client (not the Designer.) Login as user sadmin with password passw0rd.
From the menu, create a new database using the File->Application->New menu option.
Make sure you select -Blank Composite Application- as template and not a blank
application. Name the application whatever you would like the example uses MailMan as the
name.
Page 136
IBM Software
__4.
You will see a warning page since there are no components added to the database yet.
__5.
Follow the instructions on the page and select Actions->Edit Application from the menu. The
Composite Application Editor (CAE) opens.
__6.
On the left menu, right-click the Blank Page entry. This is the empty page you are editing.
Select Edit Page Properties.
__7.
Rename the page to a more descriptive name. In this example, we used MailMan as both the
title and description. Click OK when you're done.
Lab 6
Page 137
IBM Software
__8.
From the Component Palette, drag the Notes Mail View onto the page and wait for it to
display. Next drag the Notes Contacts View onto the page, all of the way over to the left
edge.. The cursor will change from the small icon of stacked folders to a dark, heavy arrow
icon. After it changes, let go. (If you drop with the stacked folder icon, the Notes Contacts View
will be added to the application as an additional tab, instead of tiling out the page the way we
want for this lab.) It really does not matter where they are placed, however you will be
interacting with the Contacts view, so make sure it is accessible. In this application, you will not
really be using the Mail view you are just using it as a target from the Contacts view.
You now have two pre-defined components in your application, but they are not communicating with
each other. You must wire them together to have them communicate having one react to changes in
the other.
Right-click Notes Contact View in the Page Navigator and select Wiring. The wiring panel opens.
Select Email address changed and note that one of the Mail View actions (Create new memo
using string) is marked with a target.
Drag Email address changed and drop it on Create new memo using string. This creates a wire
connecting the property in the Contacts view to the action in the Mail view.
Click OK. You may see a note created in the Notes client, since one of the items in the Contacts view is
selected. Switch back to the Composite App Editor if Notes popped up.
Select File->Save and Close and save your changes when prompted. This completes building your
composite application.
Page 138
IBM Software
__9.
The application should be open in your Notes desktop. You will see the two views as you laid
them out in the CAE.
Note
As soon as the application becomes active, you will see
an email created to the selected entry in the address
book view. This is because the selected contact fires
down the wire any time it changes. Notes considers it
selected when the application opens. Consider this
when doing design selection wires may fire more often
than you would think.
Lab 6
Page 139
IBM Software
__10.
Click any of the entries in the Contact view. A mail memo will open, pre-addressed to the
person you chose. When you click on a Contact, the email address is sent down the wire to the
Mail view.
__11.
Your application is complete. Note that every time you click an entry, a new memo is created,
since the email address is fired down the wire every time it changes. This may drive you slowly
insane. Think about this when you are doing composite application design. A simple action may
cause any number of other actions.
__12.
Close the database. This section of the lab is complete. You are now a composite application
developer!
6.1.2
__1.
Start the Notes client if necessary. From the main menu, create a new database by choosing
File->Application->New. For the title, enter Website Directory. You can leave the rest
defaulted. We are creating a blank application, not a blank composite application. (You can
create the database on Local or on the server.)
__2.
An empty database is created and opened. From the main menu, select View->Design to
switch to Domino Designer. The database will open in Designer after a moment or two. Close
the Welcome screen if it appears.
Page 140
IBM Software
__3.
Expand the Website Directory tab in the left column and click on Forms. On the right panel,
click New Form. Name the form WebsiteEntry in the name popup that appears and click OK.
__4.
On the form, add two text fields one is for a company name and one is for the URL of the
company's website. (Create -> Field to add a field). Label the fields if you wish. You can add
text on the form by simply typing where you would like it. (In this example, we used a table to
format the form, but the layout isn't important for this exercise.)
Lab 6
Page 141
IBM Software
__5.
Close the form (Press ESC, click the x in the tab or select File->Close from the menu.) Save
your work when prompted.
__6.
You will now create a view to list all of the entries in the database. Expand the Views list in the
left panel and you will see a pre-created view called (untitled). Double-click on it.
__7.
The name panel for the view will open. Change the name to Websites.
__8.
Your view needs two columns one for each of the fields you created on the form. There
should be a column already marked #. Double-click it.
__9.
Change the title to Company. On the second tab, change the sort order to Ascending. You
can leave all other options as-is.
Page 142
IBM Software
__10.
Lab 6
Close the Column info box. On the bottom right panel, change the Display option to Field and
select CompanyName from the list of fields. This column will now display company names.
Page 143
IBM Software
On the view, double-click to the right of the Company column (it is an open view column.) This
will create a new column in the view. Name this column Website and set its value to the
CompanyURL field. You may want to make its default length longer than ten characters since
URLs can be lengthy.
Page 144
IBM Software
__11.
__12.
Open the workspace (Open -> Applications -> Workspace) in the Notes Client and locate the
icon of the new database you just created. Right-click and select Application -> Bookmark...
Lab 6
Page 145
IBM Software
__13.
Select Favorite Bookmarks from the list in the Add Bookmark dialog and click OK
__14.
Add Notes developer to your resume! We will use the database that we just created later on
as the source for one of the components in a Composite Application.
Page 146
IBM Software
6.1.3
__1.
Component behavior and properties are defined in WSDL (Web Service Design Language an
XML dialect.) You will now use the WSDL editors in the Notes Designer to define components
and properties in your database.
__2.
Launch the Designer Client (Admin location again) and expand the bookmark for the Website
Directory database. Expand the Composite Applications option on the left side of the
Designer and double-click on Wiring Properties. This will open the list of properties defined in
the database (none at this point.)
Lab 6
Page 147
IBM Software
__3.
Click the New Wiring Property button. Enter WebsiteWiring as the name when prompted
and click OK.
__4.
You can find namespaces and properties for applications in the Component Applications Editor (the
CAE.) In the real world, the component developers should provide this information.
Under the Properties box, press the Add button.
Page 148
IBM Software
__5.
Name the property SourceURL. Change the type to URL which should be in the drop-down
list. Add a title if you would like.
Lab 6
Page 149
IBM Software
__6.
On the final tab (with the little propeller hat), look at the bottom for Composite Settings. Set
the property to SourceURL - which should be the only choice in the drop-down. Close the
property box and close the view, saving when prompted.
The view is now a component, ready to be linked within a composite application. Close the Domino
Designer.
Page 150
IBM Software
6.1.4
__1.
Our composite application contains two components, one that ships with Notes (the embedded
browser) and one that you just built. This job can be completed by an assembler rather than a
developer. As long as the components contain properties and actions within the same
namespace, they can be linked into composite applications.
__2.
From the Notes client, select File->Application->New. Use Website Viewer as the name.
Make sure you choose Blank Composite Application as the template type since this is a
composite application.
Lab 6
Page 151
IBM Software
__3.
The database opens with a blank page, since we have not defined any components. Designing
a composite application does not use the Domino Designer, rather it uses the Composite
Applications Editor (CAE.) There are instructions on the blank page on how to create your
application.
Page 152
IBM Software
Follow the instructions and choose Actions->Edit Application. The CAE will open with your
application loaded. The Component Palette contains pre-defined components.
__4.
Lab 6
Right-click on Blank Page in the page navigator and select Edit Page Properties. Change
the Page Title and Description to Website Application and press OK.
Page 153
IBM Software
__5.
You will now add your component to the palette. First, in the Component Palette drop-down,
change from Component Library to My Palette so you can add components. On the right
panel, click Add Component and select Add NSF Component. Enter Website Directory as
the Component Name and use an appropriate description. Click the Browse button.
__6.
Change the Kind of Object to View since you will use the view you defined as a
component. Change the Application to Website Directory since that is the name of your
database (or choose the correct database.) Select the view from the drop-down (there should
be only one option.) Click OK and then click OK again.
Your view is added to the palette, and can now be added to composite applications.
Page 154
IBM Software
__7.
Lab 6
(Optional) Right-click your component and select Edit Component Properties. Append
&HideNavigator to the Notes URL field, this hides the navigator which can make the
application look cleaner. Click OK. The Category of the component doesn't matter it just
affects how they are organized in the palette.
Page 155
IBM Software
__8.
Drag the view into the main panel to add it to your composite application. Since it is the only
component, it will fill the screen.
__9.
Note there is no data since we have never added any data to the database! We will create
documents later.
__10.
Switch the palette back to Component Library. Drag the Managed Browser into the main
panel. You can place it anywhere above, below, on either side of your component, or even as
a tab. If you install it as a tab, you can switch between the two panels. Otherwise, you will see
both panels concurrently, although you may have to scroll to see all the data.
__11.
You now have two components that are not communicating; they are just sharing a screen. You
will now wire them together. Right-click on Website Directory in the Page Navigator and select
Wiring.
Page 156
IBM Software
__12.
You should see your component's property in one box and the actions from the Managed
Browser in another.
__13.
Note that one of the actions has a small target next to it. This is a valid option to wire. If there is
not a target, it is not a valid wiring target. Drag Company Website onto the marked option. A
wire should connect the two.
__14.
__15.
Choose File->Save and Close to close the CAE. Save when prompted.
__16.
You should now see your new composite application with its components. Close it for now since
there are no documents, so there is nothing to load.
Lab 6
Page 157
IBM Software
__17.
Open the Website Directory database (the first database you created.) Add a few documents
by pulling down the Create menu and selecting WebsiteEntry. Make sure you use full URLs
(including http://) for the URL field.
__18.
Now, open your composite application. When you click on an entry in the view, you should see
the browser switch to that website. (If your VM has no Internet connectivity, this will actually fail.)
6.2
Summary
In this lab, the workshop attendant has created two composite applications, one with pre-defined
components and one by creating a component and linking it to an existing component.
Page 158
IBM Software
Lab 7 Xpages
The following lab exercises are designed as an introduction to Lotus Domino's xPages functionality.
Most often, the result of a previous exercise will be needed as input for following exercises. However,
some of the exercises do not directly contribute to the sample application, since they are designed to
highlight and explore functionality and capabilities of xPages not needed in the sample application in all
variations.
Important: only the exercises 6.1 6.10 are part of this Proof of Technology and fit into the time slot
scheduled for this lab. The remaining exercises 6.11 6.24 are optional exercises addressed to the
interested attendee that wants to have a deep dive hands on experience with some of the more
advanced feature of xPages.
7.1
Hello World
You will become familiar with the basic working of the xPages editor and the components palette.
Lab 7
Page 159
IBM Software
__1.
Launch the Domino server, if it isn't already running. Launch the Admin client, and use the
Online Admin location. Edit the server document again. (Refer back to the DAOS lab if you
need instructions on how to do this.) Navigate to the Security tab, and add sadmin to the field
for Sign or run unrestricted methods and operations.
__2.
Save your changes, exit the Domino Admin client, and restart the Domino server.
__3.
Open the Domino Designer 8.5 Client, located in the desktop as a shortcut.
__4.
Create a new database on the Domino85/demoibm server (<CTRL> + N), and call it xpages 1
Page 160
IBM Software
__5.
Create one xPage: after creating the database double-click on XPages in the Domino
Designer Application Navigator. The screen capture below guides you through the steps to
create a new Xpage. Name the new Xpage hwPage.
__6.
Create one Custom Control: double-click on Custom Controls and follow the steps in the
screen capture below. Name the Custom Control hwControl
Lab 7
Page 161
IBM Software
__7.
For testing purposes only, add a Label control. (If the Controls panel isn't visible, do Window > Show Eclipse Views -> Controls)
Page 162
IBM Software
__8.
__9.
__10.
Navigate back to your Xpage called hwPage. Add your new hwControl Custom Control from
the Custom Controls section in the palette to the xPage hwPage.
Lab 7
Page 163
IBM Software
__11.
__12.
Right-click on the xpages 1 bookmark in the Applications Navigator and select Application
and then Access Control. Set the the default access for your xpages 1 Domino application to
Manager and click OK.
__13.
__14.
Navigate back to the tab for your hwPage. To preview your application in a browser, click on
the preview in browser icon at the top of Domino Designer.
__15.
Optional
__16.
Can you change the Output from static Hello World to include the current time? (Use the caret
for entering JavaScript and the date() function)
__17.
Can you show your name (which would be Anonymous if you are not logged in) together with
Hello World
7.2
You will become familiar with conditional display of information in xPages. You will learn the difference
between full and partial refresh. Change your custom control to contain an input field to collect the users
name and a button to update the page to show Hello [Name entered].
Page 164
IBM Software
__1.
Make sure your hwControl control is open. Drag and Drop a Panel Container Control from the
right palette of Domino Designer to hwControl.
__2.
Name it helloPanel.
Lab 7
Page 165
IBM Software
__3.
Drag and drop a Label control to the panel. Type Your name please in the Label property.
Page 166
IBM Software
__4.
Lab 7
Drag and drop an Edit Box from the Core Controls palette and place it to the right of your
Label as shown in the screen capture below. Type yourName in the Name property of your new
Edit box.
Page 167
IBM Software
__5.
Select a Button control from the Core Controls palette and place it below the panel as shown
in the screen capture below. Type Say Hello in the Label property of your button.
Page 168
IBM Software
__6.
Lab 7
Add a custom property to the custom control: click on an empty part of the hwControl work
area. On the Properties tab, click on Property Definition. Click on the New Property button.
Type iknowyou for the Name of the property. Set the Type to boolean and the Default Value
to False. Check the Allow multiple instances box.
Page 169
IBM Software
__7.
Customize the Say Hello button with custom coding: click on the Say Hello button to select it.
Add code to the button's onClick event:
__a.
Page 170
IBM Software
__b.
__c.
__d.
__e.
Lab 7
Click OK.
Page 171
IBM Software
__8.
Click on the Edit box to the right of the label as shown in the screen capture below. Change the
Visible property by clicking the diamond icon to the right and then select Compute Value...
Page 172
IBM Software
__9.
Type the following formula in the Condition: area. When finished, click OK.
!compositeData.iknowyou
Troubleshooting
To preview the result you will need to change the focus
to the hwPage, as you can't preview a custom control.
Be sure to save both before you click the preview button.
Lab 7
Page 173
IBM Software
__10.
Back in Designer, on the hwControl, click on the Hello World button to select it. Click the
Events tab. Change the Server Options from Full Update to Partial Update.
__11.
__12.
Preview the result in the browser - the result should look like this:
Page 174
IBM Software
7.3
You will build the foundation for our sample application and learn about application structure that allows
styling your application easily. You will create three xPages that will provide access to our sample
application. You will prepare some structure for the subsequent exercises.
__1.
Important!
Don't forget to change the default access in the access
control list, to make the Default Manager.
Lab 7
Page 175
IBM Software
__2.
__3.
home
__b.
results
__c.
profile
Create a new Custom Control called container. The steps are shown in the screen capture
below.
Page 176
IBM Software
__4.
Lab 7
Add nested panels to your custom control. A panel translates into a DIV element using the
HTML rendering and it can contain additional logic. Panels are a common destination for styling
or partial refresh operations. Getting the nesting and ordering right can be very tricky if you're
just using drag & drop from the control palette to the workspace. You can use the outline panel
to rearrange things with drag & drop if needed. The screenshot shows the outline panel after
things have been properly arranged.
__a.
In the palette Container Control section click on Panel and drop it in the Work Area.
Name it frame.
__b.
Drop another Panel inside the Panel called frame. Name this Panel header.
__c.
Drop another Panel inside the Panel called header. Call this Panel headerInner
__d.
Place another Panel below the Panel called frame. Name this Panel main.
__e.
Drop another Panel inside of the Panel called main. Name this Panel tabBar.
Page 177
IBM Software
__5.
__f.
Drop another Panel just below the Panel called tabBar. Name this Panel content. (The
labels for content and tabBar are backwards in the diagram, but correct in the
screenshot.)
__g.
Page 178
IBM Software
__6.
Lab 7
Add your new container Custom Control to each of the XPages (home, results, profile).
Page 179
IBM Software
__7.
Page 180
IBM Software
__8.
Lab 7
Import all of the images into image resources Images are locates in c:\LabFiles\Xpages
\Images
Page 181
IBM Software
__9.
Add the styles resource styles.css to the Custom Control called container which you created
in prior steps. You add a stylesheet resource by clicking on the Style property for your Custom
Control called container as shown in the screen capture below.
Page 182
IBM Software
__10.
Lab 7
Page 183
IBM Software
__11.
In the Outline View, navigate to the Label you added to the headerInner panel and map the
Label to the class called headerInnerTitle. Do the same for the main, tabBar, and content
panels, applying the styles with the matching names.
__12.
In the left- Navigation area of Domino Designer double-click Application Properties. Click on
the Launch tab. Set the Web Browser Launch-->Launch property to Open designated
xPage. Then select the xPage called home.
Page 184
IBM Software
__13.
__14.
Use the preview button from the home page to see the results. If the page doesn't look like the
screenshot, double-check your application of the styles. Also try saving the home page even
though you haven't recently changed it. This will trigger the Designer client to rebuild the
project.
Things To Explore
__15.
Can you create a custom control that shows the current user name (Anonymous if you are not
logged in and add that to the newly created pages
__16.
Create a style that puts that custom control in one corner (pick one) of the screen.
7.4
__1.
In the xScrapbook application, open the Custom Control you created in section 6.3 called
container.
__2.
__3.
Add a Tabbed Panel control to the tabBar Panel by dropping it from the Container Control
section of the Domino Designer palette on the right side of your screen.
__4.
In the future, if you would like to adjust the Tabbed Panel location, you can use the Outline View
to do this.
__5.
Change the ID and Label property for each of the two tabs and add an additional tab. You can
navigate to the Properties of each tab by selecting the tab in the Outline View.
Lab 7
Page 185
IBM Software
__6.
Change the ID property for tabPanel1 to homeTab. Change the Label property to Home.
Page 186
IBM Software
__7.
Change the ID property for tabPanel2 to resultsTab. Change the Label property to Results.
__8.
In the Work area, right-click on the Tabbed Panel and select Append Tab. Change the ID
property to profileTab. Change the Label property to Profile.
Lab 7
Page 187
IBM Software
__9.
In the Outline View, click on the content Panel to highlight it in the Work area. Drop an Editable
Area control from the Core Controls section in right palette into the content Panel. Save your
changes.
__10.
Page 188
IBM Software
__11.
searchForm
__b.
profileForm
__c.
searchResults
Tip: add some temporary content to these controls to be able to see their proper operation, like:
Type in the searchForm
Type in the profileForm
Type in the searchResults
Lab 7
searchForm
profileFrom
searchResults
Page 189
IBM Software
__12.
__13.
Add each of the new custom controls to the corresponding XPage Editable Area as follows.
__a.
__b.
Next select the searchForm Custom Control from the Custom Control section of the
palette and drop it next to the green button in the Editable Area. A cursor will show up
immediately to the left of the green button when your mouse pointer is in the right place.
Save the home Xpage
Drag the searchResults Custom Control to the results XPage Editable Area.
__b.
Drag the profileForm Custom Control to the profile XPage Editable Area.
Page 190
IBM Software
__14.
Lab 7
The result should look like this when you preview in your browser. The tabs themselves are
inactive at this point we haven't linked them to anything yet. You can click on them, but it
won't change anything other than the actual tab focus.
Page 191
IBM Software
7.5
You will learn how to display notes documents in xPages using form properties and simple data binding.
Create a profile form (Classic Notes) and map the profile form to an xPage. Add data binding to the
profile xPage to show data stored in the Notes form.
__1.
__2.
Use the following for the fields. Note: You will type a label before the actual field as shown in the
screen capture below:
__a.
FullName (Text)
__i.
__b.
Email (Text)
__c.
TimeZone (Text)
__d.
__e.
Gender (Text)
__f.
Country (Text)
__g.
FirstName (Text)
__h.
LastName (Text)
__i.
Page 192
IBM Software
__3.
Click on Design-->Form Properties from the pull-down menus. Click on the Defaults tab. In
the On Web Access section for the Display Xpage instead property, select profile as the
Xpage to display..
__4.
Lab 7
Page 193
IBM Software
__5.
Open the xScrapbook application in the Notes client. Create some sample documents to test
the View which we will create in the next step.
__6.
Create a new view named profiles with the view selection formula SELECT form=profile
Page 194
IBM Software
__7.
Create the following columns. Select the designated field to be displayed in each column.
__a.
FullName (On the sort tab, set Sort to Ascending and Click on column header to
sort and choose Both)
__b.
TimeZone
__c.
__8.
Preview the view in the browser and open a document from the view (which would be pretty
empty other than our header)
__9.
Open the profileForm custom control (you created that in section 6.4). Click on the Work area
in Domino Designer to give it focus.
Lab 7
Page 195
IBM Software
__10.
On the data tab add a Domino Document datasource. Choose profile as the form.
Page 196
IBM Software
__11.
Click on the All properties tab and expand the data -> data section. Then expand the
dominoDocument entry and select OnSave for the computeWithForm option.
__12.
Save the custom control and close it. Then reopen it to make the data palette on the right side
of your screen refresh. If you don't see the data palette, click on Window-->Show eclipse
views-->data.
__13.
Select the data palette and click on the Select controls dialog box button to enable it.
Lab 7
Page 197
IBM Software
__14.
Select all the field bindings except for Full Name and the DOB (use ctrl + click to select
multiple field bindings)
__15.
Drag & drop all the selected field bindings to the profileForm Custom Control Work area
Page 198
IBM Software
__16.
__b.
Gender: Combobox
__c.
TimeZone: Combobox
__17.
Click on OK, then delete the ProfileForm placeholder text that you may have added to the top
of the custom control eariler in the lab.
__18.
Right click inside a cell in the resulting table and select Append Rows. Set the number to 3 in
the helper dialog. This will give you additional rows to help you reorder the existing rows in a
more logical grouping.
Lab 7
Page 199
IBM Software
__19.
You will need to drag the About Me label and its corresponding Rich Text field to one of the
rows you appended in the prior step. You can then move the First name: label and FirstName
field to the first row. Use the screen capture below as a guide to continue to reorder the rows.
__20.
__21.
Drag a Label Core Control (Windows -> Show Eclipse Views -> Controls if it's not there) in
the left column of a blank row at the end of the table. Name it Date of Birth. Drag a Date Time
picker Core Control to the right of the Label.
Page 200
IBM Software
__22.
Place the About Me label and field below the Date of Birth label and field.
__23.
Click on the Date Time Picker. In the Data property section, click the down-arrow next the Bind
To: property and select the DOB field. Make sure Display type: is set to Date/Time and the
Display Format is set to Date Only.
__24.
Save the custom control, open the profile xPage, and preview it in your browser. This will show
you how the form will look without data. Next, preview the profiles View and open one of the
documents. This will who you what your form will look like with data. Note: we don't have action
buttons available for now.
Lab 7
Page 201
IBM Software
__25.
Things To Explore
__26.
Add a field starsign to the profile form and create a combobox with the star signs as selection
7.6
Page Flow
You will learn how page flow works in xPages and how to code actions behind action buttons. You will
complete the profileForm custom control from exercise 5.5.
__1.
Add the styles.css to the profileForm Custom Control (we need that to comfortably pick the
styles) Open the profileForm custom control and expand Root Document in the Outline panel.
Click Custom Control in the Outline, then click the Style tab and add the style.
Page 202
IBM Software
__2.
__3.
Lab 7
Add 4 button controls into the last table row (add one table row if needed) and label them as:
__a.
Save
__b.
Delete
__c.
Cancel
__d.
Edit
Page 203
IBM Software
__4.
__5.
Page 204
IBM Software
__6.
__7.
__8.
__9.
Add a simple action that confirms you want to delete the document.
Lab 7
__a.
On the Events tab, create a simple action. Set the action to Confirm Action.
__b.
In the Confirmation text: field, type Do you really want to delete this doc?
Page 205
IBM Software
__10.
Add another simple action that deletes the document and returns to the home.xsp page.
__a.
Category: Document
__b.
__c.
__d.
Page 206
IBM Software
__11.
__12.
__13.
__14.
Apply the class profileButtonCommand to the Edit button on the style tab
__15.
Create a computed Visible property for the Edit button with this formula:
!document1.isEditable()
__16.
Lab 7
Add the simple action to Category: Document and Action: Change Document Mode and
Document Mode: Edit Mode.
Page 207
IBM Software
__17.
Page 208
IBM Software
__18.
Lab 7
Preview the profiles View. Click on a link next to a document to open it. Click on the Edit
button. Your result should look similar to the screen capture below.
Page 209
IBM Software
Things To Explore
__19.
Check the page properties, there are alternatives for the page navigation for success and failure
7.7
You will learn how to provide data to the different controls on the xPage and how to enable type-ahead
functionality in xPages. The profileForm custom control has combobox design elements. You will provide
static and dynamic lookup for the possible values for this controls.
Page 210
IBM Software
__1.
__2.
Lab 7
__a.
Name (Text)
__b.
__c.
Select New Line as the ONLY delimiter for Separate values when user enters and
Display separate values with options below
Page 211
IBM Software
__3.
__4.
Create a Notes view called keywordLookup. The selection formula will be:
SELECT Form=keywords
__5.
Change the first column to show the Name field and make it sorted: Ascending.
__6.
Preview the form in your Notes client. Create a new document. In the Name field, type
TimeZones. Copy the text from C:\LabFiles\XPages\codeSnippets\TimeZones.txt and paste
it in for the Values field. Don't grab the first couple of lines from the file start with the real
data, and paste it into the Values field. Escape out of the document and save it.
__7.
Preview the form with the Notes client again and type Countries, in the Name field. Add the
text from C:\LabFiles\XPages\codeSnippets\Countries.txt (same thing here with the first
lines). Escape out of the document and save it.
__8.
Back at the Domino Designer client, open the profileForm Custom Control. Click on the
Gender field to select it. In the Values section of the profileForm's Properties, click the Add
Item button twice. Create two items by typing in the following value for the Label of each Item:
__9.
__a.
Male
__b.
Female
Select the Country field. For the Type-ahead Property check the Enable type ahead box.
Page 212
IBM Software
__10.
Click the diamond icon next to the Suggestions: parameter. Select Compute Value... Add the
following formula:
@DbLookup(@DbName(), "keywordLookup", "Countries", "Values")
Lab 7
Page 213
IBM Software
__11.
Select the TimeZones field. For the Values property click on Add formula Item... button.
Page 214
IBM Software
__12.
__13.
Lab 7
Page 215
IBM Software
Things To Explore
__14.
Change the Country Edit box to a combobox and make it work with the same data source as
used for the type ahead.
7.8
You will learn how to show data from a Notes view in xPages. xPages allows to show data from Domino
views in a page. There can be more than one. In this exercise you will show the list of profiles in the
results page.
__1.
From the Domino Designer, open the SearchResults custom control and delete any
placeholder text you may have added earlier.
__2.
__3.
Add 3 new lines at the top of the control (we will later add other things there) using the Enter
key on your keyboard.
__4.
Drag a View Container Control from the palette onto the work area
Page 216
IBM Software
__5.
Type profiles for the View: option in the helper dialog. Press OK
__6.
Click on the View property section. Select the Units: to Percent and set the width to 100.
(100%)
__7.
Lab 7
Page 217
IBM Software
__8.
__9.
Check the Sort Column option in the View Column Header Property section.
Page 218
IBM Software
__10.
Click on the Full Name column. Check the Show value in this column as links option in the
Column Display Properties section.
__11.
__12.
Lab 7
Page 219
IBM Software
Things To Explore
__13.
Add an extra column that only contains the word Edit and opens the documents in edit mode.
__14.
__15.
Add a column that lists all the contacts from the same country (this probably requires an
additional view in the database, so you need to be seasoned).
7.9
You will learn how to show data from a Notes view in xPages. With xPages you can show data from
Domino views in a page. There can be more than one. In this exercise you will show the list of profiles in
the results You will learn how to use the xPages Scope contexts with advanced data binding and how to
propagate data from one form to another. Further you will learn how to show a subset of view data only.
You will complete the search page and show search results in the result page. The result page will show
either search results or all profiles.
Page 220
IBM Software
__1.
In Domino Designer, open the SearchForm Custom Control and delete placeholder text again.
__2.
Add a Button control and type New profile in the Label property.
__3.
__4.
__5.
Add a simple page action to the button. Set the Action to Open Page.
__6.
Select Name of page to open: Profile and the Target Document as new Document, and
click OK.
Lab 7
Page 221
IBM Software
__7.
__8.
Add a newline after the button, then add a Label Control and type Profile Search for its Label:
property. Make it bold.
__9.
Press the Enter key to go to the next line. Add a Label Control and type Enter the search
criteria for its Label: property.
__10.
Add an Edit box Control to the right of the Label you just created. Set the Width property to
250px.
__11.
To the right of the Edit box, add a Button Control and type Search for its Label: property. Set
the Style class to profilesButtonCommand in the style tab. Save the Control.
__12.
Page 222
IBM Software
__13.
Select the searchForm Custom Control from the Domino Designer Navigation area. Click on
the Edit box in the Work area. Click on the Data property. Click the radio button next to
Advanced for the bind data.
__14.
Lab 7
__a.
__b.
Page 223
IBM Software
__15.
For the Edit Box select the type-ahead property tab and click the checkbox to Enable Type
Ahead.
__16.
__17.
Click the diamond icon next to Suggestions: Click Compute Value... Specify the formula as:
@DbColumn(@DbName(), "profiles", 0)
__18.
__19.
__20.
Click the Events tab add an simple action to the button. Keep Category: Basic. Set the
Action: property to Execute Script.
__21.
Page 224
IBM Software
__22.
Add a second simple action. Set the Action: property to Open Page and set the Name of page
to open: property to results.
__23.
__24.
__25.
Add a datasource. Click the background, then select the Data properties tab. Click the Add
button and select Domino View. Set the view to profiles.
__26.
__27.
__28.
On the value tab of the field, select JavaScript and add the following script fragment:
var criteria = sessionScope.nameToSearch;
var title = "Profile search results for: ";
if(null != criteria && criteria != ""){
title += criteria;
}
else{
title = "No search criteria provided.";
}
return title;
Lab 7
Page 225
IBM Software
__29.
Select the View located on the Work )not the page background) area and click on the All
Properties tab.
__30.
__31.
Add the following computed expression for keys by clicking the blue diamond to the right.
sessionScope.nameToSearch
Page 226
IBM Software
__32.
Check the result - the home XPage should look like this in the browser.
Things to Explore
__33.
Write the search term into the application context (you will need a proper JavaScript object for
that) and display a text on the pages Today's popular searches: with the search strings mostly
used.
7.10
Input Validation
You will add data validation to the forms in the sample application. Add data validation to the search and
the profile form. You will use mandatory fields, minimum input length fields and custom validation fields.
__1.
Open the searchForm custom control and select the search input field.
__2.
On the validation tab Properties section specify the minimum (3) and maximum (40) values
for the Validate String Length Enter number of characters.
Lab 7
Page 227
IBM Software
__3.
__4.
__5.
__6.
Click on the FirstName field to select it. In the Validation property section, click on the
Required Field attribute.
__7.
Click on the LastName field to select it. In the Validation property section, click on the
Required Field attribute.
__8.
Open the profile XPage in your browser to see test your changes.
Things To Explore
__9.
Use a JavaScript regular expression (Google helps) to add a Is this a valid email to an email
field.
__10.
Use a requestScope variable isDraft to avoid validations when a document is is in draft mode
(make something up how draft mode works)
Page 228
IBM Software
7.11
You will explore the different modes of data validation and use server side validation and the error
display components. You will become familiar with xPages' error handling concepts and capabilities. You
will create in your xScrapbook database a new page to explore the 2 server side error handling controls
and their use. This exercise doesn't constitute a part of our sample application.
__1.
Open the xScrapbook database and create a new xPage called ValidationTest
__2.
Add 5 fields:
__a.
Name
__b.
TagLine
__c.
__d.
myCheckbox (a checkbox)
__e.
itemCount
__3.
Make the Name field a mandatory field and add an error message.
__4.
Give the TagLine field a minimum length of 4 and a maximum of 40, create an error message.
__5.
Make the itemCount a numeric display (in data) and add a dataConverter xp:convertNumber (in
all properties).
__6.
Preview the results in the browser we will introduce server side validation there.
__7.
Add a Display Error control next to the Name control. Set its Show error messages for
property to name.
__8.
Select the name control and in all properties - data section, set disable clientSideValidation
to true.
__9.
__10.
Add a Display Errors control into some space between the fields and the submit button.
__11.
__12.
Test in browser.
Lab 7
Page 229
IBM Software
Things To Explore
__13.
__14.
When would you use client side and when server side validation?
7.12
You will understand how to use server and client side JavaScript libraries for validation (or other
purposes). Create 2 JavaScript Libraries with sample code (provided). One client JavaScript, One server
JavaScript. Link them into your sample plage.
__1.
__2.
__3.
Paste the following code into the library:function checkSearchField(element, length, message){
if(null != element){
if(element.value == ""){
alert(message);
element.focus();
return false;
}
if(element.value.length < length){
alert(
"Please enter a value of at least " +
length + " characters."
);
element.select();
return false;
}
return true;
}
}
__4.
On the validationSample page click the resource panel and choose Add Script library and add
the ClientSideValidation library
__5.
Select the save button and select the onClick event, client side!
__6.
__7.
__8.
Name it ServerSideValidation
Page 230
IBM Software
__9.
__10.
__11.
Add a new label behind the tagLine edit control and call it tagLabel.
__12.
__13.
Preview in Browser.
Things To Explore
__14.
__15.
When would you use client side and when server side validation?
7.13
You will use a custom validator using a regular expression and another one using your own JavaScript
code. Add 3 fields to a new created test form: eMail, test1,test2. Validate the eMail field to have a valid
formed eMail address using a regular expression. Validate that the test2 field has the same content as
test1 field using JavaScript.
__1.
Lab 7
Add 3 fields:
__a.
__b.
Test1
__c.
test2
Page 231
IBM Software
__2.
__3.
__4.
__5.
__6.
Add a validation to the field test2: use a validateExpression validator and add the following
expression (important: Expression, not clientScript:
var v1 = getComponent("field1").getValue();
var v2 = this.getSubmittedValue();
return v1==v2
__7.
Things To Explore
__8.
__9.
7.14
You will learn how to complete the tab navigation and how to communicate state information. Make sure
that the right tab is displayed based on the xPage loaded. Make sure that the complete list of profiles is
shown when the results page is opened directly rather than through a query.
Page 232
IBM Software
__1.
__2.
__b.
On the Events tab for the Results Tab add an Execute Script simple action with this formula:
sessionScope.nameToSearch = null
(this clears an eventually entered search term)
__3.
Add another simple action Open Page specify Results and select no data validation.
__4.
Repeat step 1 (a and b) & 3 (but not 2) for the other 2 tabs. Specify the respective pages.
Lab 7
Page 233
IBM Software
__5.
Click on the custom control (the outline is a good place to do that) and then select the
property definition
__6.
__7.
Select the Tabbed Panel in the design editor Outline again and edit the Tab opened by
default option as a computed option, use this formula:
compositeData.selectedTabId
Page 234
IBM Software
__8.
Open all the 3 pages (home, profile, results) and select the container control there. Click on all
properties.
__9.
__10.
Check the result in the browser. One question typically asked: Can't I just have one page and
use partial page refresh to switch the tabs? The answer: yes of course. But then you loose
direct addressability of a page.
7.15
You will learn how to use the Java perspective to add a Page Icon to your page. You will familiarize
yourself with Eclipse's perspectives and you will add an icon file to give your application a unique
identifier in the browser address bar and bookmarks.
Lab 7
Page 235
IBM Software
__1.
__2.
__3.
Select Java
Page 236
IBM Software
Note
In your installation you most likely will see a different set
of perspectives available.
__4.
The navigator on the left shows the Notes database as a series of folders:
__5.
__6.
Remark: the WebContent directory fulfills the same function as the WebContent directory in a
J2EE application. You could introduce additional content here at your own risk.
__7.
Lab 7
Page 237
IBM Software
__8.
Edit the page properties for your xPages and set the pageIcon to favicon.ico and the page title
to something meaningful:
The result:
Things To Explore
__9.
Obviously Domino Designer is a regular Eclipse IDE application. So most of the things you
know about eclipse will work here.
__10.
Add additional files to the NSF using the Eclipse Java perspective.
__11.
__12.
Page 238
IBM Software
7.16
You will prepare an additional form and view elements to complete the application. Every profile will be
able to list connected profiles. To be able to do this we need a form that stores this connection
information and a view that lists these connections. In the next exercise you will put these elements to
use in your profiles application.
__1.
Create a new classic Notes form named friend in the Profile Application
__2.
__b.
__c.
__3.
__4.
__5.
__6.
Lab 7
FriendID
__b.
Name
__c.
Page 239
IBM Software
7.17
You will learn how to use the repeat control. With repeat control you can have free form repeating
elements. On the profile custom control you will add a form that you can add a profile as a friend, as
well as the list of current friends with the option to remove them.
__1.
__2.
At the bottom add a table with 5 rows and 2 columns and name it friendsTable.
__3.
__4.
Merge the 2 columns in the first row and add a heading Your friends.
__5.
__6.
__7.
__8.
__9.
Add a type-ahead formula for the friendName Edit Box (partial) and in the suggestions put the
formula below:
@DbColumn(@DbName(), "profiles", 0)
__10.
Add a simple code execution event to the onBlur event of the friendName field:
var value = @DbLookup(@DbName(), "Profiles", getComponent
("friendName").getValue(), "email");
var email = getComponent("friendEmail");
if(null != value){
email.setValue(value);
}
__11.
Page 240
IBM Software
__12.
__13.
Lab 7
Page 241
IBM Software
__14.
Add a panel in row 5 column 2 and call it friendsContainer we will use that as a refresh target
later on.
__15.
__16.
__17.
__18.
Add a panel inside the repeat control. The panel is used as container for the data binding. Call it
friendsPanel.
__19.
Add 2 computed fields below each other and use simple data binding to bind them to:
__a.
friendsCollection.Name
__b.
friendsCollection.Email
Page 242
IBM Software
__20.
__21.
__22.
__23.
Things To Explore
__24.
Is the onBlur event the right place for our friend lookup?
__25.
Move the entire friend mechanism into a custom control. Use control properties to communicate
with the main page/control
Lab 7
Page 243
IBM Software
7.18
Themes (optional)
You will learn about Themes and visual customization. You first will explore the Themes used in the
discussion template and after that you will create a new Theme for use with your application.
__1.
Page 244
IBM Software
__2.
Set the access control of the database to allow for anonymous access (otherwise you can't
preview information without a server).
__3.
Open the database in the browser and check out the functionality, both in the Notes client and
the browser.
Lab 7
Page 245
IBM Software
__4.
Open the database in Designer and change the theme in the database properties:
__5.
Page 246
IBM Software
__6.
Create a Theme for your own application (scrapbook or profiles) and add this code:
<control override="false">
<name>InputField.EditBox</name>
<property mode="concat">
<name>style</name>
<value>;height:20px;font-size:18px;</value>
</property>
</control>
Lab 7
Page 247
IBM Software
__7.
Things To Explore
__8.
Themes can extend other themes. There can be server wide themes or database specific
themes. Themes can use JavaScript to determine settings (as can bee seen in the Discussion
template themes).
__9.
7.19
You will learn how to call a Java function in xPages. Some code is better written in Java (low level
network communication, things that readily exist etc.). You will create a Java Class and call it from your
Page 248
IBM Software
xPage.
__1.
Lab 7
Page 249
IBM Software
__2.
Locate the WebContent/WebInfo folder and create a directory source and below a directory
javaSample.
Page 250
IBM Software
__3.
Lab 7
Page 251
IBM Software
__4.
Page 252
IBM Software
__5.
Lab 7
Page 253
IBM Software
__6.
__7.
__8.
__9.
__10.
Page 254
IBM Software
__11.
7.20
You will learn how to use a combination of client and server side JavaScript. There are two tasks: 1)
Before a server side action is performed you execute a client side script that determines if that serverside script should execute at all. 2) In a client side script you want to use server side script constructs.
__1.
__2.
Navigate to the link inside the friends repeat control that contains the Remove command. Your
server side code should look like that:
Lab 7
Page 255
IBM Software
__3.
__4.
__5.
__6.
__7.
__8.
Page 256
IBM Software
Things To Explore
__9.
What happens if you use ${...} instead of #{...} for your macro inclusion
__10.
Define a use case where an automated script (no user interaction) would prevent the serverside action.
7.21
You will learn how to call a Notes agent from xPages and hand over the document for processing. Use
your scrapbook database. Create one form with 3 fields: color, shape (editable, text), statement (text,
computed when composed, formula -> empty string), create a view to show those documents. Put both
onto a single xpage and make an agent process the document when saved in xPages.
__1.
__2.
__b.
__c.
Create a view AgentDemos with 3 columns to show color, shape, statement. Use this view
selection formula:
SELECT (Form = AgentDemo)
__3.
Lab 7
3.Create a new xPage AgentSample.xsp and add entry fields for color and shape, below add
a button to save the form and below that add a view to see the existing document. (Don't forget
the data binding!) It should look about this (feel free to make it pretty):
Page 257
IBM Software
__4.
In the button select a simple action to save all data sources and to load the same page again:
Test your page. It will create new entries with an empty statement column (not that this example makes
any business sense, that's why it is in your scrapbook).
__5.
Locate the data events of the xPage (near the root) and expand the events linked to the
document:
Page 258
IBM Software
__6.
__7.
Lab 7
Create a new LotusScript agent (the good old fashioned way), call it agFromXpage
Page 259
IBM Software
__8.
Important remark:
In a classic WebQuerySave agent a handle to the
current document is obtained using
NotesSession.DocumentContext. That handle returns
the NotesDocument after it has been processed by the
server BEFORE it hits the disk. You can use
NotesDocument.SaveOptions = 0 to prevent a save.
In xPages currently you hand over a NodeID (not a
universal-ID!) to the agent and the agent code needs to
use NotesSession.currentAgent.ParameterDocID to get
the ID of the document and retrieve it. The document will
be in it's saved state (so if you call an agent other than
from the PostSave event you will have an OLD copy of
the data to work on (which can be useful too).
In a WebQuerySave agent Print statements are sent
back to the browser. Currently the xPages
implementation doesn't support this, so you might need
to write return information into a field in the document, so
xPages can pick them up from there.
Page 260
IBM Software
__9.
The Result:
Things To Explore
__10.
__11.
__12.
7.22
You will learn how to use existing @Formula in your documents. You happen to have existing forms with
well designed default @Formula and Input translations you want to re-use. Enhance the example from
the previous form to take advantage of back-end @formula
Lab 7
Page 261
IBM Software
__1.
Open the Notes form from Exercise 6.21 and enhance the field color with the following default
and input translation formulas:
Default: Green
Input translation: @Trim(@ProperCase(@thisValue))
__2.
__3.
Page 262
IBM Software
__4.
Open the xPage, select the xPage element, open the all properties tab.
__5.
__6.
Test the form. You will notice that this behavior is slightly different from the classic default
value/input translation behavior. ComputeWithForm executes input translation formula even
for new documents onLoad.
Things To Explore
__7.
How does the behavior change when you select only one option?
7.23
You will learn how to convert an existing Notes view into an xPage automatically. In your applications
there are a lot of views. To accelerate deployment of xPage based applications you want to automate
the creation of xPage based view access.
Lab 7
Page 263
IBM Software
__1.
Copy the file ViewToXpage.xslt from the workshop resources to the directory
[YourNotesDataDirectory]\xsl
__2.
__3.
Page 264
IBM Software
__4.
Select the view you want to transform and the ViewToXpage.xslt file
Lab 7
Page 265
IBM Software
__5.
Use Window > Show Eclipse View > Other > Java > Package Explorer
Page 266
IBM Software
__6.
In the package explorer select the xpages folder, right click and select import:
__7.
Lab 7
Page 267
IBM Software
__8.
The transformation is based on XSLT. So altering the XSLT file (make a copy first) will lead to
different results. 2 challenges here:
__a.
__b.
Modify the stylesheet, so it features an input form on top of the view to enter new data.
Tip: Create the desired outcome xPage in Domino designer first. Design it until it looks
good, works well. Use 2-3 sample fields. Then wrap the pages into an XSLT
transformation replacing the sample data with xsl:apply-template statements.
Page 268
IBM Software
7.24
You will learn how to use embedded HTML and JavaScript including Dojo. Create a new page in your
scrap book database to explore the possibilities of embedded JavaScript and HTML.
__1.
__2.
Important note: all xPage elements use the namespace xp:, Don't use it for your own elements.
__3.
You can add any HTML inside the the xp:view and it will be rendered in your page:
<h1>This is a HTML headline</h1>
Amazing isn't it?
Lab 7
Page 269
IBM Software
__4.
xPages renders any markup in computed fields into literal strings. To use controls to actually
output HTML you need to disable output-escaping (this is very useful e.g. In views to render
custom hyperlinks). Output-escaping is defined in the all properties section of any control.
Page 270
IBM Software
__5.
Things added to the xPage source or a computed field can include JavaScript or CSS
statements. Be aware that they become part of the page body (inside the <body></body> tags).
Try to add this JavaScript:
<script language="Javascript">
XSP.addOnLoad(function () {
initLocal(); } );
</script>
__6.
This will call an additional function once your page has been loaded. The function can be in a
library (recommended) or elsewhere on the page.
__7.
When working with client side script (e.g. In Dojo calls) you need to provide the ID of the
element. Since xPages is designed to run in various environments where elements can be
repeated, the html/DOM it is only generated at rendering time. To access the ID you need to call
a server-side function. Inside an xPages event this is easy using the syntax #
{id:NameOfYourElement}. However you might want to reference an element outside of an
event.
__8.
Add a new label to the page. Name it FancyLabel. We use it as target for the Demo. In real life
applications you will probably do more fancy things there.
__9.
Add a computed field to the top of the page and add the following code to it. Make sure you set
the escape property to false:
var
out
out
out
out
out
out
out
__10.
Lab 7
Preview in Browser, you should get a prompt and a hello world in red
Page 271
IBM Software
Things To Explore
__11.
Page 272
IBM Software
Appendix
Page 273
IBM Software
Appendix B. Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program,
or service that does not infringe any IBM intellectual property right may be used instead. However, it is
the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or
service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can
send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106-0032, Japan
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states
do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement
may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part
of the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be
Page 274
IBM Software
the same on generally available systems. Furthermore, some measurements may have been estimated
through extrapolation. Actual results may vary. Users of this document should verify the applicable data
for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction and intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental. All references to fictitious companies or individuals are
used for illustration purposes only.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs.
Overview
Page 275
IBM Software
AIX
CICS
ClearCase
ClearQuest
Cloudscape
Cube Views
DB2
developerWorks
DRDA
IMS
IMS/ESA
Informix
Lotus
Lotus Workflow
MQSeries
OmniFind
Rational
Redbooks
Red Brick
RequisitePro
System i
System z
Tivoli
WebSphere
Workplace
System p
Adobe, Acrobat, Portable Document Format (PDF), and PostScript are either registered trademarks or
trademarks of Adobe Systems Incorporated in the United States, other countries, or both.
Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other
countries, or both and is used under license therefrom.
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United
States, other countries, or both. See Java Guidelines
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel
SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
ITIL is a registered trademark and a registered community trademark of the Office of Government
Commerce, and is registered in the U.S. Patent and Trademark Office.
IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications
Agency which is now part of the Office of Government Commerce.
Page 276