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.

This chapter discusses the:

  • HTML, cHTML, and WML template files for Calendar, Mail, and Address Book providers

  • HTML, cHTML, and WML template files for Wireless Personal Note, PostIt Note, URL Scraper, User Info, and Bookmark 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.

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

  • wml directory enable the display of the channel on a WML client

  • chtml directory enable the display of the channel on a cHTML client

Refer to Chapter 7 "Tag Swapper Tags" for detailed information on the tags used in these template files.



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



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



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



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.

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.

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