Previous Contents Index Next |
iPlanet Portal Server: Mobile Access Pack Programmer's Guide |
Chapter 4 Content Provider Template Files
Besides including extensions to the iPlanet Portal Server User Info, Personal Notes, Post-it Notes, and Bookmarks providers, the Mobile Access Pack includes Calendar, Mail, and Address Book providers to deliver appropriate content to HTML, WML, and cHTML clients from the iPlanet Calendar Server, iPlanet Messaging Server, and Personal Address Book server respectively.
HTML, cHTML, and WML template files for Calendar, Mail, and Address Book providers
The templates discussed in this chapter facilitate the display of the provider content via channels on devices that support these markup languages. These HTML, cHTML, and WML template files can be used to customize the content delivery on the user's Desktop and mobile device.HTML, cHTML, and WML template files for Wireless Personal Note, PostIt Note, URL Scraper, User Info, and Bookmark providers
These template files are located in /etc/opt/SUNWips/desktop/<locale>/<iwtComponent>/<clientType> directory. Template files in the:
html directory enable the display of the channel on an HTML client
Refer to Chapter 7 "Tag Swapper Tags" for detailed information on the tags used in these template files.wml directory enable the display of the channel on a WML client
chtml directory enable the display of the channel on a cHTML client
The Calendar Provider Template Files
The following template files are located in the /etc/opt/SUNWips/desktop/<locale>/iwtCalendarProvider/html, /etc/opt/SUNWips/desktop/<locale>/iwtCalendarProvider/chtml/, and in the /etc/opt/SUNWips/desktop/<locale>/iwtCalendarProvider/wml/ directories. These files facilitate the display of the calendar channel on all of the supported clients.
The calendar channel gets the events and displays the day and/or week view (stored in the iwtCalendarProvider-dayView and iwtCalendarProvider-weekView attributes respectively), getting the start and end time as well as the location, summary, and description. The channel then displays the events in the display specified by the user. The summary header is displayed on top; then the day view, which has the times, location, summary, and description, is displayed, and the week view is displayed below the day view, with the days of the week, the times of events, and summary information.
Figure 4-1    Sample Calendar Channel
display-clientURL.template - This template displays the Single Sign On URL for the calendar client on the user's desktop. It uses the [tag:calendar-display-client-uri] and the [tag:calendar-display-client-sessionid] tags.
display-error.template - This template displays an error message in the Calendar channel. It uses the [tag:calendar-display-error] tag.
display-summary.template - This template displays a summarized information; for example, at the top of the channel, this file displays the number of events for the day. It uses the [tag:iwtDesktop-fontFace1], [tag:calendar-display-summary-events] tags.
display-dayView.template - This template displays the complete day view information. It uses the [tag:iwtDesktop-fontFace1], [tag:calendar-display-dayView-dayOfWeek], [tag:calendar-display-dayView-month], [tag:calendar-display-dayView-day], [tag:calendar-display-dayView-year], and [tag:calendar-display-dayView-eventList] tags.
display-dayView-emptyEventList.template - This template displays nothing for an empty day if the user's calendar display preference is set to Day View. It uses the [tag:iwtDesktop-fontFace1] tag.
display-dayView-event.template - This template retrieves the events for the day if the user's calendar display preference is set to Day View. It uses the [tag:calendar-display-dayView-event-startHourOfDay0], [tag:calendar-display-dayView-event-startHourOfDay1], [tag:calendar-display-dayView-event-startHour0], [tag:calendar-display-dayView-event-endHourOfDay0], [tag:calendar-display-dayView-event-endHourOfDay1], [tag:calendar-display-dayView-event-endHour0], [tag:iwtDesktop-fontFace1], [tag:calendar-display-dayView-event-startHour1], [tag:calendar-display-dayView-event-startMinute], [tag:calendar-display-dayView-event-startAmPm], [tag:calendar-display-dayView-event-endHour1], [tag:calendar-display-dayView-event-endMinute], [tag:calendar-display-dayView-event-endAmPm], [tag:calendar-display-dayView-event-location], [tag:calendar-display-dayView-event-summary], and [tag:calendar-display-dayView-event-description] tags.
display-dayView-eventAllDay.template - This template displays events for the day without specifying the start and end hour (simply denotes the event as an "All Day" event) if the user's calendar display preference is set to Day View. It uses the [tag:iwtDesktop-fontFace1], [tag:calendar-display-dayView-event-allDay], [tag:calendar-display-dayView-event-location], [tag:calendar-display-dayView-event-summary], and [tag:calendar-display-dayView-event-description] tags.
display-weekView.template - This template displays the events located in the Week View, according to the days of the week. It uses the [tag:iwtDesktop-fontFace1], [tag:calendar-display-weekView-dayOfWeek0] - [tag:calendar-display-weekView-dayOfWeek6], [tag:calendar-display-weekView-day0] - [tag:calendar-display-weekView-day6], and [tag:calendar-display-weekView-eventList0] - [tag:calendar-display-weekView-eventList5].
display-weekView-emptyEventList.template - This template displays nothing if the user's preference is not set to Week View.
display-weekView-event.template - This template retrieves information about the events in the week when the user's calendar display preference is set to Week View. It uses the [tag:calendar-display-weekView-event-startHourOfDay0], [tag:calendar-display-weekView-event-startHourOfDay1], [tag:calendar-display-weekView-event-startHour0], [tag:calendar-display-weekView-event-endHourOfDay0], [tag:calendar-display-weekView-event-endHourOfDay1], [tag:calendar-display-weekView-event-endHour0], [tag:calendar-display-weekView-event-startHour1], [tag:calendar-display-weekView-event-startMinute], [tag:calendar-display-weekView-event-startAmPm], [tag:calendar-display-weekView-event-endHour1], [tag:calendar-display-weekView-event-endMinute], [tag:calendar-display-weekView-event-endAmPm], and [tag:calendar-display-weekView-event-summary] tags.
display-weekView-eventAllDay.template - This template retrieves information about the events in the week when the user's calendar display preference is set to Week view without specifying the start and end hour (simply denotes the event as an "All Day" event) of the events. It uses the [tag:calendar-display-weekView-event-allDay] and [tag:calendar-display-weekView-event-summary] tags.
display.template - This file is used as a wrapper for the whole channel. It uses the [tag:calendar-display-summary], [tag:calendar-display-dayView], [tag:calendar-display-weekView], [tag:calendar-display-clientURL], [tag:calendar-display-client-uri], and [tag:calendar-display-client-sessionid] tags.
edit.template - This template displays the calendar channel edit page on the user's HTML desktop only. It uses the [tag:dayView], [tag:weekView], [tag:iwtDesktop-fontFace1], [tag:calendarServerName], [tag:calendarServerPort], [tag:calendarUserName], and [tag:calendarUserPassword] tags.
Figure 4-2    Sample Calendar Channel Edit Page
The Mail Provider Template Files
The following template files are located in the /etc/opt/SUNWips/desktop/<locale>/iwtMailProvider/html, /etc/opt/SUNWips/desktop/<locale>/iwtMailProvider/chtml/, and in the /etc/opt/SUNWips/desktop/<locale>/iwtMailProvider/wml/ directories. These files facilitate the display of the mail channel on all of the supported clients.
The mail channel uses the servername, username, and password set by the user in the edit UserInformation page or the edit Mail page to connect to the mail server and get the summary of the unread and total messages. The channel gets the undeleted message headers from the user's inbox and sorts them by the received date on the message. The channel then displays the message headers in the sort order specified by the user.
Figure 4-3    Sample Mail Channel
display-clientURL.template - This template displays the Single Sign On URL for the mail client on user's desktop. It uses the [tag:mail-display-clientURL-uri] tag.
display-error.template - This template displays an error message in the Mail channel. It uses the [tag:mail-display-error] tag.
display-summary.template - This template serves content for the summary of messages in the channel. It uses the [tag:iwtDesktop-fontFace1], [tag:mail-display-summary-unread], and [tag:mail-display-summary-total] tags.
display-headers-message.template - This template displays each message header in the Mail channel on the user's HTML desktop. It uses the [tag:mail-display-headers-message-cbgc], [tag:mail-display-headers-message-clientURL], [tag:mail-display-headers-message-subject], [tag:mail-display-headers-message-mailto], [tag:mail-display-headers-message-name], [tag:mail-display-headers-message-date], [tag:mail-display-headers-message-status], and [tag:iwtDesktop-fontFace1] tags.
display-headers.template - This template is used to wrap around all the message headers. It uses the [tag:mail-display-headers-subject], [tag:mail-display-headers-from], [tag:mail-display-headers-date], [tag:mail-display-headers-status], [tag:mail-display-headers-messageList], and [tag:iwtDesktop-fontFace1] tags.
display.template - This template displays the complete content on the mail channel. This file serves as a wrapper around all the other template files. It uses the [tag:mail-display-summary], [tag:mail-display-headers], and [tag:mail-display-clientURL] tags.
edit.template - This template displays the edit page of the mail channel on the user's html desktop. It uses the [tag:iwtDesktop-fontFace1], [tag:displayHeadersChecked], [tag:numberHeaders], [tag:topSelected], [tag:topString], [tag:bottomSelected], [tag:bottomString], [tag:IMAPServerName], [tag:IMAPUserId], [tag:IMAPPassword], [tag:changeUserInfoChecked], [tag:clientURL], [tag:clientPort] (see ), [tag:msgCopyInSentChecked], [tag:signature], and [tag:preset1] to [tag:preset9] (see ) tags.
Figure 4-4    Sample Mail Channel Edit Page
Figure 4-5    Sample Mail Channel Edit Page for Wireless Clients
The Address Book Provider Template Files
The following template files are located in the /etc/opt/SUNWips/desktop/<locale>/iwtAddressBookProvider/html, /etc/opt/SUNWips/desktop/<locale>/iwtAddressBookProvider/chtml/, and in the /etc/opt/SUNWips/desktop/<locale>/iwtAddressBookProvider/wml/ directories. These files facilitate the display of the address book channel on all of the supported clients.
The address book channel uses the IMAP username and password set by the user in the address book channel edit page to connect to the mail server. If the IMAP user name and password fields are left empty in address book channel edit page, this information is retrieved from the mail channel (edit page), and if it is not found in the mail channel, then this information is retrieved from the user info channel (edit page). The channel then displays a summary of the total number of entries in the user's address book followed by the actual address book entries.
Figure 4-6    Sample Address Book Channel
display-clientURL.template - This template displays the link to the address book application client. It uses the [tag:ab-display-clientURL-appURL] tag.
display-error.template - This template displays the error messages. It uses the [tag:ab-display-error] tag.
display-summary.template - This template displays the summary information of the address book channel. It uses the [tag:ab-display-summary-entries] tag.
display-entry.template - This template prints out a single address book entry. Address book entries are displayed in HTML channel only. It uses the [tag:iwtDesktop-fontFace1], [tag:ab-display-entry-cbgc], [tag:ab-display-entry-firstname], [tag:ab-display-entry-lastname], [tag:ab-display-entry-email], and [tag:ab-display-entry-email-link] tags.
display-entries.template - This template lists the entire list of address book entries. Address book entries are displayed in HTML channel only. It uses the [tag:iwtDesktop-fontFace1] and [tag:ab-display-entry-list] tags.
display.template - This template indicates what information needs to be displayed in the channel. It uses the [tag:ab-display-summary], [tag:ab-display-entries], and [tag:ab-display-clientURL] tags.
edit.template - This template displays the edit page of the address book channel on the user's HTML desktop. It uses the display-entries.template file to list the entire list of address book entries. Address book entries are displayed in the HTML channel only. It uses the [tag:iwtDesktop-fontFace1], [tag:iwtAddressBookProvider-displayEntries], [tag:iwtAddressBookProvider-numEntries], [tag:iwtAddressBookProvider-isNoSorting], [tag:iwtAddressBookProvider-isLnSelected], [tag:iwtAddressBookProvider-isFnSelected], [tag:iwtAddressBookProvider-isUpSelected], [tag:iwtAddressBookProvider-isDownSelected], [tag:iwtAddressBookProvider-IMAPUserId], and [tag:iwtAddressBookProvider-IMAPPassword] tags.
Figure 4-7    Sample Address Book Channel Edit Page
The Wireless Personal Notes Provider Template Files
The following template files are located in the /etc/opt/SUNWips/desktop/<locale>/iwtWirelessPersonalNoteProvider/html, /etc/opt/SUNWips/desktop/<locale>/iwtWirelessPersonalNoteProvider/chtml/, and in the /etc/opt/SUNWips/desktop/<locale>/iwtWirelessPersonalNoteProvider/wml/ directories. These files facilitate the display of the personal notes channel on all of the supported clients.
content.template - This file serves as a wrapper around the personal note content. It uses the [tag:note] tag.
darkColor.template - This file contains a valid background color value and is used by a table.
lightColor.template - This template contains a valid background color value and is used by a table.
textColor.template - This template contains a valid color value for the text in the table.
edit.template - This template displays the edit page for the personal note channel on the HTML desktop. It defines the layout and editable fields for the end user to modify or add content. It uses the [tag:iwtDesktop-fontFace1], [tag:noteCount], and [tag:noteList] tags.
Figure 4-8    Sample Personal Notes Channel Edit Page
editNoteListWrapper.template - This template serves as a wrapper around the editable personal note content. It defines the table row and table cells that are used for the layout, and the display of the personal note content. It uses the [tag:iwtDesktop-fontFace1], [tag:removeId], [tag:nameId], and [tag:note] tags.
tableDataWrapper.template - This template serves as a wrapper around the table datacell content. It specifies the background color of the table datacell (see darkColor.template and lightColor.template), the text color of the content (see textColor.template), and the personal note content. It uses the [tag:iwtDesktop-fontFace1], [tag:textColor], and [tag:pnote] tags.
tableWrapper.template - This template serves as a wrapper around all of the table datacell content. It is merely the table declaration. It uses the [tag:tableData] tag.
linebreak.template - This template contains the markup language specific element for line break. That is, for chtml, this file contains the "<br>" element syntax and for wml, it contains the syntax "<br/">.
The PostIt Provider Template Files
The following template files are located in the /etc/opt/SUNWips/desktop/<locale>/iwtPostItProvider/chtml/ and in the /etc/opt/SUNWips/desktop/<locale>/iwtPostItProvider/wml/ directories. These files facilitate the display of the postit notes channel on all of the supported clients.
content.template - This template serves as a wrapper around the postit note content. It uses the [tag:note] tag.
linebreak.template - This template contains the markup language specific element for line break. That is, in cHTML this file contains the "<br>" element syntax and in WML, it contains the syntax "<br/">.
The Wireless URL Scraper Provider Template Files
The following template file is located in the /etc/opt/SUNWips/desktop/<locale>/iwtWirelessURLScraperProvider/wml/ directory. These files facilitate the display of the URL Scraper channel on all of the supported clients.
link.template - This template displays the page as a link instead of actually scraping the contents on a WML client. It uses the [tag:wirelessurlscraper-linkurl] tag.
The UserInfo Provider Template Files
The following template files are located in the /etc/opt/SUNWips/desktop/<locale>/iwtUserInfoProvider/, /etc/opt/SUNWips/desktop/<locale>/iwtUserInfoProvider/chtml/ and in the /etc/opt/SUNWips/desktop/<locale>/iwtUserInfoProvider/wml/ directories. These files facilitate the display of the user information channel on all of the supported clients.
content.template - This template serves as a wrapper around the user info channel content. It uses the [tag:iwtUserInfoProvider-firstName], [tag:iwtUserInfoProvider-lastName], [tag:currentDate], [tag:timeLeft], and [tag:maxIdle] tags.
edit.template - This template displays the user information channel edit page on the HTML desktop. It uses the [tag:iwtDesktop-fontFace1], [tag:iwtUserInfoProvider-firstName], [tag:iwtUserInfoProvider-lastName], [tag:iwtUserInfoProvider-greeting], [tag:timezoneList], [tag:iwtUser-IMAPServerName], [tag:iwtUser-SMTPServerName], [tag:iwtUser-IMAPUserId], [tag:iwtUser-IMAPPassword], [tag:localeList], and [tag:passwordHandler] tags.
Figure 4-9    Sample User Info Channel Edit Page
The Wireless Bookmarks Provider Template Files
The following template files are located in /etc/opt/SUNWips/desktop/default/iwtWirelessBookmarkProvider/html, /etc/opt/SUNWips/desktop/default/iwtBookmarkProvidercHTML/chtml/ and in /etc/opt/SUNWips/desktop/default/iwtBookmarkProviderWML/wml/ directories. These files facilitate the display of the bookmark channel on all of the supported clients.
display.template - This template serves as a wrapper around the bookmark content. It uses the [tag:iwtDesktop-fontFace1] and [tag:bookmarks] tags.
edit.template - This template serves as the edit page for the bookmark channel from the HTML desktop. It defines the layout and editable fields for the end user to modify or add content. It uses the [tag:iwtDesktop-fontFace1], [tag:resourceCount], and [tag:resourceList] tags.
Figure 4-10    Sample Bookmarks Channel Edit Page
urlWrapper.template - This template serves as a wrapper for the URL or resource. It defines the syntax for the URL. This template is used within getContent(). It uses the [tag:link] and [tag:name] tags.
- For WML clients, the template supplied during installation uses a SELECT object defined within the display.template and uses the urlWrapper.template to define options for the SELECT (such as, <option onpick="[tag:link]" value="[tag:name]">[tag:name]</option>) action. In cHTML, it defines a URL with the ANCHOR tag such as, <a href="location">name</a>.
Previous Contents Index Next
Copyright © 2001 Sun Microsystems, Inc. All rights reserved.
Last Updated November 14, 2001