Sun ONE Portal Server 6.2 Desktop Customization Guide |
Chapter 6
Understanding the Sample PortalThis chapter describes the sample portal that you can choose to install on your system during the Sun ONE Portal Server installation. See the Sun ONE Portal Server 6.2 Installation Guide for more information on installing the sample portal.
This chapter assumes that the sample portal is installed. It contains the following sections:
Overview of the Sample PortalThe sample portal consist of the following elements:
- Sample channels and containers (discussed in this chapter)
- Sample Portal templates and JSPs (see Appendix A, "Desktop Template and Tag Reference" and Appendix C, "JavaServer Pages Reference")
- Authless user definition and display profile XML fragment
- Authless templates and JSPs (see Appendix A, "Desktop Template and Tag Reference" and Appendix C, "JavaServer Pages Reference")
Sample Containers for the Sample Desktop
This chapter discusses the sample portal sample containers, each of which produces a different looking Desktop. A container is a channel that is able to hold and organize content from other channels. The sample portal is created from the following containers:
Creates a Desktop that contains multiple containers selected using different tabs. Normally, each tab is constructed by using the corresponding PredefinedTabPanelContainer. This container is JSP-based. Its provider is JSPTabContainerProvider.
Creates a Desktop that arranges a maximum of five sub-containers into the channel arrangement. This container is JSP-based. Its provider is JSPTableContainerProvider.
Creates a Desktop using frames. The left-hand frame enables you to navigate, and the right-hand frame displays the channels. This container is JSP-based. Its provider is JSPTabContainerProvider.
Creates a Desktop that contains multiple containers selected using different tabs. Normally, each tab is constructed by using the corresponding PredefinedTemplatePanelContainer. This container is template-based. Its provider is TemplateTabContainerProvider.
Creates a Desktop that arranges a maximum of five sub-containers into the channel arrangement. This container is template-based. Its provider is TemplateTableContainerProvider.
When you install the sample portal, the default channel is set to JSPTabContainer. Users can view this portal by typing:
http://hostname:port/portal/dt
You can easily view each sample portal Desktop by typing in the appropriate URL.
The Sun ONE Portal Server software determines the user’s default container by examining the Default Channel Name attribute for the Desktop page in the Sun ONE Identity Server software administration console.
The container architecture uses the various containers, and JavaServer Pages (JSP) or template files, to display the Desktop, and to build a hierarchy of containers that organize the Desktop content. Channels are defined at the global display profile level and are referenced by all the containers.
For more information on each container, see the appropriate section in this chapter.
Guidelines for Using the Sample Portal
Do not directly edit any of the files that make up the sample portal (display profile XML, JSP, and template files). Instead, make a copy of the sample portal to a new directory and then modify those copied files. In this way you preserve the integrity of the sample portal. Additionally, if you later apply a patch to the portal server, you won’t loose any changes you might have made to the sample portal files, as the patch would only overwrite the initially installed sample files.
You should also create a custom Desktop type for your users. For example, if the Desktop type were sesta, then you would create a /etc/opt/SUNWps/desktop/sesta directory to contain the template files that you have customized. You only need to copy the files that you have changed from the sample installation to the new directory tree. This structure enables you to tell at a glance which files have been modified from the original distribution. It also eliminates the need to back up copies of the original sample files. Also, in the administration console, specify sesta,sampleportal for the sunPortalDesktopType attribute.
To re-load the default (original) display profile for the sample portal providers, the dp-providers.xml and dp-org.xml files (in portal-server-install-root/SUNWps/samples/desktop directory) must be reloaded. The dp-providers.xml file goes in the global level and the dp-org.xml file goes in the organization level. For example, type:
portal-server-install-root/SUNWps/bin/dpadmin modify -u "uid=amAdmin,ou=People,dc=sesta,dc=com" -w password -g portal-server-install-root/SUNWps/samples/desktop/dp-providers.xml
portal-server-install-root/SUNWps/bin/dpadmin modify -u "uid=amAdmin,ou=People,dc=sesta,dc=com" -w password -d "dc=sesta,dc=com" portal-server-install-root/SUNWps/samples/desktop/dp-org.xml
Sample Portal Installation Directories
If you choose to install the sample portal, the installer locates the appropriate files in the following directories:
portal-server-install-root/SUNWps/samples/desktop
This directory contains the following display profile documents:
/etc/opt/SUNWps/desktop/sampleportal
Contains the JSP, template, and other support files for the Sun ONE Portal Server software sample portal.
/etc/opt/SUNWps/desktop/anonymous
Contains the JSP, template, and other support files for the Sun ONE Portal Server software Desktop anonymous user.
Desktop Theme Link
For the template-based containers, when you choose the Theme link, the look and feel of the tool bar changes slightly. (This is not the case for the JSP-based containers.) This happens because the template-based containers use JSPSingleContainer (which is a JSP-based container), and not a template-based container. Thus, the look and feel of the Theme page is “JSP,” not “template.”
Also, not all of the theme attribute values are applied to the template-based Desktops. For example, the header of the selected theme is not used in the template-based Desktops. The template-based desktops only use those attributes that are supported in Sun ONE Portal Server 6.0 software.
JSP-based Tab Container (JSPTabContainer)Figure 6-1 shows the JSP-based tab Desktop, JSPTabContainer, which provides a JSP-based tab container consisting of five tabs, My Front Page, Samples, Search, Collaboration, and Sample Portlet which includes the following channels:
- In the My Front Page tab: Login or User Information, Sun ONE Information, Bookmark, Sample JSP, and XML Test channels
- In the Samples tab: Sun ONE Information, URL Scraper, and Notes channels
- In the Search tab: Search channel
- In the Collaboration tab: Discussions Lite and Discussions channels
- In the Portlet Samples tab: Bookmark, Showtime, and Weather portlet channels
Figure 6-1 JSP Tab-Based Desktop (JSPTabContainer)
JSPTabContainer Architecture
Figure 6-2 shows the JSPTabContainer architecture. In this figure, tab.jsp is the top-level JSP file. The tab.jsp file makes include calls to the header.jsp, availableTabs.jsp, menubar.jsp, and footer.html files. The availableTabs.jsp file makes an include call to the selectedTab.jsp and tabs.jsp files.
See Appendix C, "JavaServer Pages Reference" more information on these JSP files.
JSPTabContainer, by default, is made up of five sub-containers—MyFrontPageTabPanelContainer, SamplesTabPanelContainer, SearchTabContainer, CollaborationTabPanelContainer, and JSPTabContainer/PortletSamplesTabPanelContainer—as represented by Tab1 (tablecontainer) in the figure.
Figure 6-2 JSPTabContainer Architecture
JSPTabContainer Actions
This section describes the various actions that you can perform within JSPTabContainer.
Banner Links
- Home - Returns you to the Desktop Home page from customization pages and updates content.
- Tabs - Lets you remove, rename, or select the start tab, and also create a new tab. The link for this page is:
action=edit&provider=JSPTabContainer
- Theme - Lets you edit the Desktop theme. The theme enables you to set the color scheme and font type for the Desktop. You can choose from preset themes or make your own colors for a custom theme. The link for this page is:
action=edit&provider=JSPPresetThemeContainer
The custom theme channel is defined as a JSPSingleContainerProvider channel, and has an entry in the display profile. See "JSPSingleContainerProvider" for more information.
Links Specific to the Contained Container
The channels in each tab depend on the contained container of the JSPTabContainer. In the Sample Portal, these contained containers are JSPTableContainer and the channels are dependant on this container; but this does not have to be the case, they can be any container. The Content and Layout links provide the ability to customize the current selected contained container.
Content and Layout Links
The top-most JSP in the table container defines the Content and Layout links. JSPContentContainer is the container that displays the Content page, and JSPLayoutContainer is the container that displays the Layout page. The following describes the actions for these pages:
- Content - Lets you edit the content for this particular tab on the Content page. The link for this page, when the My Front Page tab is selected, is:
action=edit&provider=JSPContentContainer&container=MyFrontPageTabPanelC ontainer&selected=My+Front+Page
- Layout - Lets you edit the layout of the channels for this particular tab on the Layout page. The link for this page, when the My Front Page tab is selected, is:
action=edit&provider=JSPLayoutContainer&container=MyFrontPageTabPanelCo ntainer&selected=My+Front+Page
JSPTabContainer Edit Pages
When you click the Tabs link in the Desktop, the Current Tabs Settings Edit page, where you can make changes, is displayed.
When you click Make a New Tab, the corresponding Edit page is shown. You decide what to name the tab and what the tab topics are. Content Page is displayed only when making a new tab from scratch. When other Tab Topics are selected, a new tab which looks similar to the TabTopic selected, is created and displayed.
Container Display Profile
JSPTabContainerProvider Display Profile
The provider responsible for generating the JSPTabContainer channel is JSPTabContainerProvider. See "JSPTabContainerProvider" for the display profile XML for this provider.
JSPTabContainer Channel Display Profile
The provider profile is the template which decides the properties for a container channel, but the container channel profile will ultimately decide the values for the container channel attributes. See "JSPTabContainer" for the display profile for JSPTabContainer channel.
Container’s Display Profile Properties
The default properties that make up JSPTabContainer work as follows:
- contentPage is set to tab.jsp. This draws the Content Page for the tab container.
- editPage is set to tabedit.jsp. This displays the Edit page for the tab container where new tabs can be added, and existing tabs removed or renamed.
- startTab sets the tab that opens first on the Desktop as MyFrontPageTabPanelContainer.
- maxTabs allows six tabs to be created. As there are currently five tabs, one more can be added.
- makeTabProvider is used when creating a new tab from scratch.
- channelNumber specifies that a number is appended to a newly created tab as the channel name. This number is increased each time a new tab is created, so that the new tab will have unique name. For example, to create a new tab based on MyFrontPageTabPanelContainer in JSPTabContainer, the new tab channel name would be JSPTabContainer/MyFrontPageTabPanelContainer1. (The new tab name is actually the channelName property in the display profile plus the the value of channelNumber. channelNumber is incremented by one each time a new tab is created.)
- contentChannel specifies JSPContentContainer as the content channel that provides the Content page displaying channels to add to a user-created tab.
- presetThemeChannel specifies JSPPresetThemeContainer as the channel that is displayed in the Theme - Preset Theme page.
- customThemeChannel specifies JSPCustomThemeContainer is the channel that displayed in the Theme - Custom Theme page.
- The collection TabProperties has <Collection name=> entries for each of the available tab defined in JSPTabContainer.
- The Available list describes all available channels for this container. The available channels are displayed in the Content Preference page for users to select from.
- The Selected list describes selected channels for this container. Only selected channels shows up in the Desktop.
Contained Containers’ Display Profile
The JSP tab container available channel list has MyFrontPageTabPanelContainer, SamplesTabPanelContainer, SearchTabPanelContainer, PredefinedSamplesTabPanelContainer, and PredefinedFrontPageTabPanelContainer as its contained channels.
JSP Files Used by JSPTabContainer
Sun ONE Portal Server software uses JSP files for a channel’s presentation layer. JSPTabContainer references two main JSPs, tab.jsp and tabedit.jsp, through the contentPage and editPage properties.
Content template is responsible for the front page of the container channel and the file name for the tab container channel is tab.jsp. The tab.jsp file extensively uses the Desktop taglibs. For more information on taglibs, see Appendix B, "JavaServer Pages Tag Library Reference."
The Edit page is where you can add, remove, and rename tabs. The tabedit.jsp is used to display this page. For a description of all JSP files used by JSPTabContainer, see Appendix C, "JavaServer Pages Reference."
JSP-based Table Container (JSPTableContainer)Figure 6-3 shows the JSP-based table Desktop, JSPTableContainer, which provides a JSP-based table container consisting of the following channels:
JSPTableContainer Architecture
Figure 6-4 shows the JSPTableContainer architecture. In this figure, toptable.jsp is the top-level JSP file. The toptable.jsp file makes include calls to the header.jsp, launchPopup.jsp, leafWrapper.jsp, and menubar.jsp files.
See Appendix C, "JavaServer Pages Reference" more information on these JSP files.
JSP-based table Desktop contains leaf channels that can be arranged in rows and columns. There are three kinds of column layouts: thin-wide, wide-thin, or thin-wide-thin.
The default layout for JSPTableContainer is set to 1, which gives the thin-wide columns for the table. In Figure 6-4, Channels One, Two, and Three are thin channels, and Channels Four and Five are wide channels.
Figure 6-4 JSPTableContainer Architecture
JSPTableContainer Actions
This section describes the various actions that you can perform within JSPTableContainer.
Banner Links
- Home - Returns you to the Desktop Home page from customization pages and updates content.
- Theme - Lets you edit the Desktop theme. The theme enables you to set the color scheme and font type for the Desktop. You can choose from preset themes or make your own colors for a custom theme. The link for this page is:
action=edit&provider=JSPPresetThemeContainer
Links Specific to the Contained Container
JSPTableContainer does not contain any container containers, it only has leaf channels. This container uses JSPContentContainer and JSPLayoutContainer to edit the content and layout, respectively.
Content and Layout Links
The toptable.jsp file defines the Content and Layout links. JSPContentContainer is the container that displays the Content page, and JSPLayoutContainer is the container that displays the Layout page. The following describes the actions for these pages:
- Content - Lets you edit the content on the Content page. The link for this page is:
action=edit&provider=JSPContentContainer&container=JSPTableContainer
- Layout - Lets you edit the layout of the channels on the Layout page. The link for this page is:
action=edit&provider=JSPLayoutContainer&container=JSPTableContainer
Container’s Display Profile
JSPTableContainerProvider Display Profile
The provider responsible for generating the JSPTableContainer channel is JSPTableContainerProvider. See "JSPTableContainerProvider" for the display profile XML for this provider.
JSPTableContainer Channel Display Profile
The provider profile is the template which decides the properties for a container channel, but the container channel profile will ultimately decide the values for the container channel attributes. See "JSPTableContainer" for the display profile for JSPTableContainer channel.
Container’s Display Profile Properties
The default properties that make up JSPTableContainer work as follows:
- contentPage is set to toptable.jsp. This draws the Content Page for the table container.
- The collection categories defines the categories under which the available channels in the JSPTabContainer will be grouped in the Content page. Here there are three categories: Personal Channels, Sample Channels, and News Channels.
- The collection channelsRow, and values that appear in this collection, contain the row number value for channels in this container. For example, the mail check channel is defined as row 4.
- The collection channelsIsRemovable defines a collection to contain the isRemovable value for channels in this container. Only one channel, user information, is defined, with a value of false, so that it cannot be removed.
- The Available list describes all available channels for this container. The available channels are displayed in the content preference page for users to select from.
- The Selected list describes selected channels for this container. Only selected channels shows up in the Desktop.
JSP Files Used by JSPTableContainer
Sun ONE Portal Server uses JSP files for a channel’s presentation layer. JSPTableContainer references one main JSPs, toptable.jsp, through the contentPage property.
Content template is responsible for the front page of the container channel and the file name for the tab container channel is toptable.jsp. The toptable.jsp file extensively uses the Desktop taglibs. For more information on taglibs, see Appendix B, "JavaServer Pages Tag Library Reference." For a description of all JSP files used by JSPTableContainer, see Appendix C, "JavaServer Pages Reference."
Frame-based Container (FrameTabContainer)Figure 6-5 shows the frame-based table Desktop, FrameTabContainer, which provides a frame-based table container consisting of two frames, My Front Page and Samples, with the following channels:
FrameTabContainer Architecture
Figure 6-6 shows the FrameTabContainer architecture. In this figure, frametab.jsp is the top-level JSP file. The frametab.jsp file makes include calls to the frametabmenu.jsp, header.jsp, banner.jsp, selectedTab.jsp, menubar.jsp, frameset.jsp, and footer.html files.
See Appendix C, "JavaServer Pages Reference" more information on these JSP files.
FrameTabContainer is made up of two sub-containers, MyFrontPageFramePanelContainer and SamplesFramePanelContainer, as represented by Page 1 (tablecontainer) in the figure.
Figure 6-6 FrameTabContainer Architecture
FrameTabContainer Actions
This section describes the various actions that you can perform within FrameTabContainer.
Banner Links
- Home - Returns you to the Desktop Home page from customization pages and updates content.
- Sections - Lets you rename or select the start page, delete a page, and also create a new page. The link for this page is:
action=edit&provider=FrameTabContainer
- Theme - Lets you edit the Desktop theme. The theme enables you to set the color scheme and font type for the Desktop. You can choose from preset themes or make your own colors for a custom theme. The link for this page is:
action=edit&provider=JSPPresetThemeContainer
The custom theme channel is defined as a JSPSingleContainerProvider channel, and has an entry in the display profile. See "JSPSingleContainerProvider" for more information.
Content and Layout Links
The top-most JSP in the table container defines the Content and Layout links. JSPContentContainer is the container that displays the Content page, and JSPLayoutContainer is the container that displays the Layout page. The following describes the actions for these pages:
- Content - Lets you edit the content for this particular page on the Content page. The link for this page, when My Front Page is selected, is:
action=edit&provider=JSPContentContainer&container=MyFrontPageFramePane lContainer
- Layout - Lets you edit the layout of the channels for this particular page on the Layout page. The link for this page, when the My Front Page tab is selected, is:
action=edit&provider=JSPLayoutContainer&container=MyFrontPageTabPanelCo ntainer&selected=MyFrontPageFramePanelContainer
FrameTabContainer Edit Pages
When you click the Sections link on the Content page, the Current Page Settings Edit page appears, where you can make changes.
When you click Make a New Page, the corresponding Edit page is shown. You decide what to name the page and what the page topics are. Content Page is displayed only when making a new tab from scratch. When other Tab Topics are selected, a new tab which looks similar to the TabTopic selected, is created and displayed.
Container’s Display Profile
JSPTabContainerProvider Display Profile
The provider responsible for generating FrameTabContainer channel is JSPTabContainerProvider. See "JSPTabContainerProvider" for the display profile XML for this provider.
FrameTabContainer Channel Display Profile
The provider profile is the template which decides the properties for a container channel, but the container channel profile will ultimately decide the values for the container channel attributes. See "FrameTabContainer" for the display profile for FrameTabContainer channel.
Container’s Display Profile Properties
The properties that make up FrameTabContainer work as follows:
- contentPage is set to frametab.jsp. This draws the Content Page for the frame container.
- editPage is set to frametabedit.jsp. This displays the Edit page for the frame container where new pages can be added, or existing pages removed or renamed.
- startTab sets the page that opens first on the Desktop as MyFrontPageFramePanelContainer.
- maxTabs allows four pages to be created. As there are currently two pages, two more can be added.
- makeTabProvider specifies JSPFrameCustomTableContainerProvider as the provider to create a new page on the Desktop.
- channelNumber specifies that a number is appended to a newly created page as the channel name. This number is increased each time a new page is created, so that the new page will have unique name. For example, to create a new page based on MyFrontPageFramePanelContainer in FrameTabContainer, the new page channel name would be FrameTabContainer/MyFrontPageFramePanelContainer1. (The new page name is actually the channelName property in the display profile plus the value of channelNumber property. The channelNumber property value is incremented by one each time a new page is created.)
- contentChannel specifies JSPContentContainer as the content channel that provides the Content page displaying channels to add to a user-created page.
- The collection TabProperties has <Collection name=> entries for each of the four containers that are available in the FrameTabContainer.
- The Available list describes all available channels for this container. The available channels are displayed in the content preference page for users to select from.
- The Selected list describes selected channels for this container. Only selected channels shows up in the Desktop.
Contained Containers’ Display Profile
By default, in its available list, the frame tab container channel has MyFrontPageFramePanelContainer, SamplesFramePanelContainer, PredefinedFrontPageFramePanelContainer, and PredefinedSamplesFramePanelContainer as its contained channels.
JSP Files Used by FrameTabContainer
Sun ONE Portal Server uses JSP files for a channel’s presentation layer. FrameTabContainer references two main JSPs, frametab.jsp and frametabedit.jsp, through the contentPage and editPage properties.
Content template is responsible for the front page of the container channel and the file name for the tab container channel is frametab.jsp. The frametab.jsp file extensively uses the Desktop taglibs. For more information on taglibs, see Appendix B, "JavaServer Pages Tag Library Reference."
The Edit page is where you can add, remove, and rename pages. The frametabedit.jsp is used to display this page. For a description of all JSP files used by FrameTabContainer, see Appendix C, "JavaServer Pages Reference."
Template-based Containers (TemplateTabContainer and TemplateTableContainer)TemplateTabContainer and TemplateTableContainer use the original template mechanism from iPlanet Portal Server 3.0. TemplateTableContainer is the same as the normal Desktop from iPlanet Portal Server 3.0, and TemplateTabContainer is the same as the tabbed Desktop from iPlanet Portal Server 3.0. Use these containers for migrating from existing iPlanet Portal Server 3.0 (Service Pack 3a or 4) custom Desktops to Sun ONE Portal Server 6.2 software.
See the Sun ONE Portal Server 6.2 Migration Guide for more information.
TemplateTabContainer
The TemplateTabContainer uses templates for the tabbed Desktop.