Sun Java System Portal Server 6 2005Q4 Technical Reference Guide |
Chapter 42
JSP-Based DesktopThis chapter contains the following sections:
JSPTabContainerThe JSPTabContainer provides a JSP-based tabbed Desktop.
Sample Desktop
Default Layout
By default, the sample portal Desktop based on the JSPTabContainer (see Figure 42-1) includes 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 Information, Bookmark, Sample JSP, and XML Test channels
- In the Samples tab: Sun 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 42-1 Sample Desktop Based on JSPTabContainer
Default Actions
The sample JSPTabContainer channel, by default, includes:
- Banner links to return Home, tabs to allow the user to remove, rename or select the start tab, and also create a new tab (the URL for this page is action=edit&provider=JSPTabContainer), theme to allow the user to set the color scheme and font type for the Desktop (the URL for the preset theme page is action=edit&provider=JSPPresetThemeContainer), help that displays the Desktop sample online help (the URL is ../docs/locale/desktop/helppage.htm), Log Out link to log the user out of the Desktop (the URL is action=logout), and Search to allow the user to search.
When you click the Tabs link in the Desktop, the Current Tabs Settings Edit page, where you can make changes, is displayed. Start Tab lets you set the starting tab; Tab Name specifies the name of the tabs in the container; and Action lets you rename or delete a tab from the Desktop. (JavaScript handles the action.)
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.
- Links specific to the contained containers. 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.
Default Display Profile Settings
The provider responsible for generating the JSPTabContainer channel is JSPTabContainerProvider. 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.
The properties that make up JSPTabContainer work as follows by default.
JSPTabContainer Architecture
Figure 42-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.
Figure 42-2 JSPTabContainer Architecture
JSP Files Used by JSPTabContainer
The 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.
The Edit page is where you can add, remove, and rename tabs. The tabedit.jsp is used to display this page.
JSPTableContainerThe JSPTableContainer provides a JSP-based table Desktop.
Sample Desktop
Default Layout
By default, the sample portal Desktop based on the JSPTableContainer (see Figure 42-3) contains the following channels:
Default Actions
The sample JSPTableContainer channel, by default, includes:
- Banner links to return to the Desktop Home page, Desktop theme to allow the user to set the color scheme and font type for the Desktop (the URL for this page is action=edit&provider=JSPPresetThemeContainer), Log Out to allow the user to log out of the Desktop (the URL for this page is action=logout), Help to display the Desktop sample online help (the URL for this page is ../docs/locale/desktop/helppage.htm), and Search to allow the user to search.
- Leaf channel. JSPTableContainer does not contain any contained 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 Content link (action=edit&provider=JSPContentContainer&container=JSPTableContainer) allows the user to edit the content on the Content page and the Layout link (action=edit&provider=JSPLayoutContainer&container=JSPTableContainer) allows the user to edit the layout of the channels on the Layout page.
Default Display Profile Settings
The provider responsible for generating the JSPTableContainer channel is JSPTableContainerProvider. 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. The default properties that make up JSPTableContainer work as follows:
JSPTableContainer Architecture
Figure 42-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.
Figure 42-4 JSPTableContainer Architecture
JSP Files Used by JSPTableContainer
The Portal Server uses JSP files for a channel’s presentation layer. JSPTableContainer references one main JSP, 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.