The calendar application is a useful organization tool. The application allows users to add, edit, and remove events and tasks, and includes support for repeating events, email reminders, and multiple calendar servers.
Users can also modify and delete events and tasks of other calendar users provided they are subscribed to the calendar and have the permission to delete and change events and tasks.
To launch a calendar application, users first log into the sample portal provided with Mobile Access. The mobile Portal Desktop displays a list of numbered options to select: User Information, Bookmarks, Personal Notes, Calendar, Address Book, and Mail.
The calendar option provides users access to the calendar server. The calendar home page summarizes the events and tasks scheduled for the day.
Three different calendar servers are capable of interacting with this application. They are Sun Java System Calendar Server (formerly Sun ONE Calendar Server), Microsoft Exchange, and Lotus Notes. Three different sets of JSP pages are used to support all the features made available by these three servers. A generic set of JSP pages supports features common to all three calendar servers. In fact, the generic set covers all the Microsoft Exchange features. However, the Java System and Lotus Notes servers have unique features found respectively in the cal/sun-one, and cal/notes directories.
The name of the file that displays the day view page is dayview.jsp. On a browser, this page displays the current calendar ID, the date, and a summary of any tasks or events currently scheduled. The displayed page also provides options that users can select in order to add a new event, add a new task, view other calendars, or reset the calendar to a specific date. In the source code, such options are specified as <util:link> from the util tag library, as described in <util:link>.
The calendar application allows users to add two basic kinds of scheduling objects: events, and tasks. Events and tasks are similar in that they both contain generic properties such as title, location, and details, but differ in that events specify a start and end time, whereas tasks specify a due date and indicate whether or not the task is complete.
To add an event to the calendar, users select the Add event option from the day view page. The code for the day view page—which is stored as the dayview.jsp file—contains the following tag: <util:link>. This tag points to the eventSess.jsp file, which creates a new event. This new event—which at this point does not have any information entered by the user—is added to user sessions. For more information about user sessions, see <util:session> section in the session in Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference guide. From user sessions, the tag <util:forward> passes control to the editEvent.jsp file and is displayed on screen as a series of individual prompts. Users are prompted for event information, such as Start (for start time), End (for end time), Title, Location, and Details. After filling in the required information, users see the following options in their browsers: Submit, Repeat, Invite, Remind, and Compose.
The Submit option submits the newly created event. When users select the Submit option, control flows to the doUpdateEvent.jsp file. This action brings up a success or failure confirmation message. Furthermore, this action brings up an option users can select to return to the day view page.
The Repeat option allows users to specify the repeat frequency (daily, weekly, monthly, or yearly) for the event. Beyond the initial repeat frequency options, users have more specific options from which to select, as follows:
For the daily repeat frequency, users can specify that the event repeat every day, on alternate days, or on a group of days, such as Monday, Wednesday, and Friday; Tuesday and Thursday; or Saturday and Sunday.
For the weekly repeat frequency, users can specify that the event repeat every week, on alternate weeks, or once per week on a particular day.
For the monthly repeat frequency, users can specify that the event repeat every month, on alternate months, or once per month on a specified date.
For the yearly repeat frequency, users can specify that the event repeat every year, on alternate years, or once per year on a specified date.
After users select a repeat frequency and supply repeat information, they have the option of supplying one final parameter: the “Repeat until” value. As its name implies, this value sets the duration of time that the repeat should continue.
The choices are to repeat until: Forever, Number of Instances, or Date.
The JSP files responsible for the repeat process begin with the prefix repeat, as in repeatFreq.jsp. The files involved are: repeatFreq.jsp, repeatInt.jsp, repeatInterval.jsp, repeatIntOK.jsp, repeatOn.jsp, repeatOnOK.jsp, repeatOnMonthly.jsp, repeatOnWeekly.jsp, repeatOnYearly.jsp, repeatUntil.jsp, repeatUntilDate.jsp, repeatUntilDateOK.jsp, repeatUntilNumber.jsp, and repeatUntilNumOK.jsp.
To see exactly which files control the repeat behavior, consult the control flow reference charts for Calendar in the Sun Java System Portal Server Mobile Access 7.1 Developer’s Reference guide.
The Invite option allows users to invite another person (the invitee) to the event. Selecting this option presents users with a number of methods for specifying the invitee, including: Quick Invite, Search, and Enter calID (calendar ID). When users select the Invite option, control flows from the dayview.jsp file to the rsvp.jsp file, to the doRSVP.jsp file, and then back to the eventHm.jsp file.
This feature is not supported when connecting to servers other than Sun Java System Calendar Server.
The Remind option enables users to set up email reminders. When users select this option, they are prompted for additional reminder data, (with one prompt per screen), as follows: the recipient’s email address, the time (prior to the event) to send the email reminder, and a message to be included with the reminder. After users select the Remind option, control flows through the following files: remindMail.jsp, remindTime.jsp, remindInterval.jsp, remindMsg.jsp, doRemind.jsp, and then back to eventHm.jsp.
This feature is not supported when connecting to servers other than Sun Java System Calendar Server.
The Compose option allows users to modify the event being created. When users select the Compose option, control flows to the editEvent.jsp file.
Users can also add tasks to the calendar. The method for adding a task to the calendar is similar to the method for adding an event. From the day view page, users simply select the Add Task option and proceed to fill in the requested information, such as the task title, location, due date, due time, details, and whether or not the task is already complete. When finished, users are given the following options: Submit, Remind, and Repeat.
Control flow through the various JSP pages for adding a task is similar to the flow for adding an event. First, control passes from the dayview.jsp file to the taskSess.jsp file, which creates a new task. This new task—which at this point does not have any information entered by the user—is added to user sessions. From there, the tag <util:forward> passes control to the taskHm.jsp file, which issues the task-related options provided when adding a task: Submit, Remind, and Repeat. The Remind and Repeat options take users through the same process as described in Adding an Event. The only difference between the process of adding an event and adding a task is that the source files responsible for adding a task have the suffix “Task,” such as remindMailTask.jsp. While the source files for adding an event do not have this suffix, such as remindMail.jsp.
The task location, task remind, and task repeat features are not supported when connecting to servers other than Sun Java System Calendar Server.
Users can reset the day view page to any arbitrary date by selecting the Go To option. When users select this option, the tag <util:link> transfers control from the dayview.jsp file to the goto.jsp file, which presents users with the following Go To options: “Today”, “Next week”, “Next month”, “Previous week”, “Previous month”, or a “Specific date”.
As you might expect, when users select the “Next week” and “Next month” options, the calendar rolls forward by a week or a month; the “Previous week” and “Previous month” options roll the calendar back.
The Today option rolls the calendar to the current date. When users select the “Specific date” option, control transfers from the goto.jsp file to the date.jsp file. Users can then type a specific date, which rolls the calendar to that date.
When the calendar is rolled forward or backward, control passes from the dayview.jsp file to the doRoll.jsp file, and then back to the dayview.jsp file, which displays the data for the new date. For convenience, the day view page also provides links to the next six days of the calendar, each of which link to the doRoll.jsp file as well.
As described in The Day View Page, the day view page summarizes all events and tasks for the day. Each summary is also an option that, when selected, displays the details of the particular event or task. For the purpose of this discussion, imagine a calendar containing one event (a party at 7:00 p.m.) and one task (buying refreshments, due by 5:00 p.m.).
To view the event or task, users select the desired option, which passes control from the dayview.jsp file to the event.jsp file or the task.jsp file.
To change event details, users select the Change option, which prompts users for event details (see Adding an Event). To delete the event, users select the Delete option, which leads to the delete.jsp file, and eventually back to the dayview.jsp file.
As with the event details, changing or deleting the task is simply a matter of following the appropriate options.