Sun Java System Portal Server Mobile Access 7.1 Developer's Guide

The Mobile Address Book Application

The address book is a convenient application for storing personal contacts. The address book application works in conjunction with the mobile mail application to provide an efficient mechanism for sending mail to one or more recipients.

As with the calendar application, users launch the address book application from options provided on the mobile desktop. From the mobile desktop, the address book option allows users access to the address book channel. Users launch the address book application by selecting the address book option. This action passes control to the list.jsp file, which presents the address book home page to users.

The address book home page summarizes the number of contacts currently stored and allows users to interact with the application.

Adding a Contact

To add a contact to the address book, users select the “Add contact” option, which uses the <util:link> tag to transfer control from the list.jsp file to the add.jsp file. The add.jsp file uses the <util:include> tag to link to GUI code in the edit.jsp file, which presents users with a series of individual prompts describing the new contact.

The prompts include: “First name”, “Last name”, Phone, and Email. Control passes from the add.jsp file to the doAdd.jsp file (which submits the contact to the address book). The <util:forward> tag automatically returns control to the list.jsp file.

Adding a Group

The address book allows users to place multiple contacts into named groups. To create a new group, users select the “Add group” option, which passes control from the current page (the list.jsp file) to the add group page (the addGroup.jsp file).

The add group page prompts users for the name of the group, then passes control to the members options page (the addMembersOption.jsp file), which presents the following menu:

Search

The Search option allows users to find a specific contact or group, or a list of contacts or groups, by entering search criteria and choosing the contacts or groups from the list of results.

When users select this option, control passes from the addMembersOption.jsp file to the searchMemberChoices.jsp file, then to doSearchMemberChoices.jsp file, and finally to the pickMemberChoices.jsp file. The pickMemberChoices.jsp file displays the results in the form of a choice list, from which users can select the contacts or groups to be added to the group.

Browse

The browse option allows users to scroll through the complete list of stored contacts and groups, without having to explicitly perform a search. When users select this option, control passes from the addMembersOption.jsp file to the browseMemberChoices.jsp file.

After fetching all of the contacts and groups, the browseMemberChoices.jsp file forwards control to the pickMemberChoices.jsp file. Again, this file displays the results in the form of a choice list, from which users can pick and select the contacts or groups to be added to the group.

Enter Member

The Enter Member option allows users to enter a contact or group directly if the exact name is already known.

Viewing, Changing, or Deleting a Contact

To view the details for a specific contact, users select the desired name from the list of contacts presented from the list.jsp file. If the selected option points to a single contact, control passes from the list.jsp file to the view.jsp file. If the selected option is for an entire group, control passes to the viewGroup.jsp file.

After selecting a single contact, users have three options: Compose (an email to the named contact), Change (the contact details), or Delete (the selected contact). Depending on which option users select, control passes from the current page to the compose.jsp file, change.jsp file, or the delete.jsp file.

Compose

This option is for composing an email message; for more information see The Mobile Mail Application.

Change

The Change option allows users to change the first name, last name, phone number, and email address of the selected contact. The JSP page responsible for generating this page (the change.jsp file) uses the <util:include> tag to include the GUI from the edit.jsp file. Existing properties appear with their current values, which users can change or accept.

Control flow passes from the change.jsp file, which collects the information, to the doChange.jsp file, which submits the changes and returns users to the address book home.

Delete

To delete a contact from the address book, users simply select the Delete option. Control passes from the current page (The view.jsp file) to the delete page (The delete.jsp file) and then back to the address book home.

Viewing, Changing, or Deleting a Group

Users view, change, or delete a group from the address book following the same procedure as described for a single contact; however, in this scenario, control passes to group-specific JSP files such as the changeGroup.jsp file, doChangeGroup.jsp file, and the deleteGroup.jsp file.

When users view a group, they see a list of the group members and they have the option of composing an email to the entire group. Users can change a group by adding or deleting group members, or by changing the name of the group. Users delete a group in the same manner that they delete a contact, as explained in Delete.