Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2004Q2 Desktop Customization Guide 

Chapter 5
Customizing Container Tabs

This chapter provides a variety of tasks to customize the container tabs. It contains the following sections:


Adding a Tab to JSPTabContainer

A tab can be any container type, but, by default, the sample portal uses table container. To add a new tab, you must first define the container, then register that container in JSPTabContainer, which “houses” the tabs.

    To Add a Tab to JSPTabContainer
  1. Create the necessary display profile.
    1. Define the new collection within <Collection name="TabProperties"> in JSPTabContainer, for example:
    2. ...

          <Collection name="NewTabPanelContainer">

              <Boolean name="removable" value="false"/>

              <Boolean name="renamable" value="true"/>

              <Boolean name="predefined" value="true"/>

          </Collection>

          ...

      </Collection>

      ...

    3. Add entries to the <Available> and <Selected> tags, for example:
    4. ...

          <Available>

              <Reference value="NewTabPanelContainer"/>

              ...

          </Available>

      ...

          <Selected>

              <Reference value="NewTabPanelContainer"/>

              ...

          </Selected>

      ...

    5. Define a container for NewTabPanelContainer, for example:
    6. <Container name="NewTabPanelContainer" provider="JSPTableContainerProvider">

          <Properties>

              <String name="title" value="New Container Channel"/>

              <String name="contentPage" value="tabtable.jsp"/>

              <String name="description" value="This is a test for front table containers"/>

              <String name="Desktop-fontFace1" value="Sans-serif"/>

              <Collection name="categories">

                  <String value="Personal Channels"/>

                  <String value="Sample Channels"/>

              </Collection>

              <Collection name="Personal Channels">

                  <String value="UserInfo"/>

                  <String value="MailCheck"/>

              </Collection>

              <Collection name="Sample Channels">

                  <String value="SampleJSP"/>

                  <String value="SampleXML"/>

              </Collection>

          </Properties>

          <Available>

              <Reference value="UserInfo"/>

              <Reference value="MailCheck"/>

              <Reference value="SampleJSP"/>

              <Reference value="SampleXML"/>

          </Available>

          <Selected>

              <Reference value="UserInfo"/>

              <Reference value="MailCheck"/>

              <Reference value="SampleJSP"/>

              <Reference value="SampleXML"/>

          </Selected>

          <Channels>

              ...

          </Channels>

      </Container>

    7. If predefined property value is true in the TabProperties collection (Step a), then it is recommended to define a Provider for the container channel which is meant to be used as a predefined tab.
    8. For example:

      Code Example 5-1  PredefinedNewTabPanelContainerProvider Display Profile Definition  

      <Provider name="PredefinedNewTabPanelContainerProvider" class="com.sun.portal.providers.containers.jsp.table.JSPTableContainerProvider" version="2">

          <Properties>

              <ConditionalProperties condition="locale" value="en" >

                  <ConditionalProperties condition="locale" value="US" >

                      <String name="title" value="New Sample"/>

                      <String name="description" value="New Tab"/>

                  </ConditionalProperties>

             </ConditionalProperties>

             <String name="title" value="New Sample"/>

             <String name="description" value="New Tab"/>

             <String name="contentPage" value="tabtable.jsp"/>

              <String name="presetThemeChannel" value="JSPPresetThemeContainer" advanced="true"/>

             <String name="customThemeChannel" value="JSPCustomThemeContainer" advanced="true"/>

              <String name="parentTabContainer" value="JSPTabContainer" advanced="true"/>

              <String name="Desktop-fontFace1" value="Sans-serif"/>

              <String name="refreshTime" value="" advanced="true"/>

              <String name="width" value="thin" advanced="true"/>

              <String name="fontFace1" value="Sans-serif"/>

              <String name="productName" value="Sun Java System Portal Server"/>

              <String name="maximizedChannel" value=""/>

              <Integer name="timeout" value ="240"/>

              <Integer name="layout" value="1"/>

              <Boolean name="showExceptions" value="false"/>

              <Boolean name="parallelChannelsInit" value="false"/>

              <Boolean name="refreshParentContainerOnly" value="false" advanced="true"/>

              <Boolean name="isEditable" value="true" advanced="true"/>

              <String name="editType" value="edit_complete" advanced="true"/>

             <String name="editContainerName" value="JSPEditContainer" advanced="true"/>

             <Integer name="thin_popup_height" value="200"/>

             <Integer name="thin_popup_width" value="500"/>

             <Integer name="thick_popup_height" value="300"/>

             <Integer name="thick_popup_width" value="600"/>

              <Integer name="fullwidth_popup_height" value="500"/>

              <Integer name="fullwidth_popup_width" value="600"/>

             <Boolean name="defaultChannelIsMinimizable" value="true"/>

             <Boolean name="defaultChannelIsMaximizable" value="true"/>

             <Boolean name="defaultChannelIsMinimized" value="false" advanced="true"/>

              <Boolean name="defaultChannelIsDetached" value="false" advanced="true"/>

              <Boolean name="defaultChannelIsDetachable" value="true"/>

             <Boolean name="defaultChannelIsRemovable" value="true"/>

              <Boolean name="defaultChannelHasFrame" value="true" advanced="true"/>

             <Boolean name="defaultChannelIsMovable" value="true"/>

              <Boolean name="defaultBorderlessChannel" value="false" advanced="true"/>

              <String name="defaultChannelColumn" value="1" advanced="true"/>

              <String name="defaultChannelRow" value="1" advanced="true"/>

              <Collection name="categories">

                  <String value="Sample Channels"/>

              </Collection>

              <Collection name="Sample Channels">

                  <String value="SampleRSS"/>

                  <String value="SampleURLScraper"/>

                  <String value="Notes"/>

                  <String value="SampleSimpleWebService"/>

              </Collection>

              <Collection name="channelsColumn" advanced="true">

                  <String name="SampleURLScraper" value="2"/>

                  <String name="Notes" value="2"/>

                  <String name="SampleSimpleWebService" value="2"/>

              </Collection>

             <Collection name="channelsRow" advanced="true">

                  <String name="SampleURLScraper" value="2"/>

                  <String name="Notes" value="3"/>

                  <String name="SampleSimpleWebService" value="4"/>

              </Collection>

              <Collection name="channelsIsMinimized" advanced="true"/>

              <Collection name="channelsIsDetached" advanced="true"/>

              <Collection name="channelsHasFrame" advanced="true"/>

              <Collection name="channelsIsMinimizable"/>

              <Collection name="channelsIsMaximizable"/>

              <Collection name="channelsIsMovable"/>

              <Collection name="channelsIsRemovable"/>

              <Collection name="channelsIsDetachable"/>

              <Collection name="borderlessChannels"/>

          </Properties>

      </Provider>

    9. Define the container channel based on the PredefinedNewTabPanelContainerProvider.
    10. When the user creates a new tab based on the predefined tab, all the properties for this tab are picked up from the Provider definition. For example:

      Code Example 5-2  PredefinedNewTabPanelContainer Channel Properties  

      <Container name="PredefinedNewTabPanelContainer" provider="PredefinedNewTabPanelContainerProvider">

          <Properties/>

          <Available>

              <Reference value="SampleRSS"/>

              <Reference value="SampleURLScraper"/>

              <Reference value="Notes"/>

              <Reference value="SampleSimpleWebService"/>

          </Available>

          <Selected>

              <Reference value="SampleRSS"/>

              <Reference value="SampleURLScraper"/>

              <Reference value="Notes"/>

              <Reference value="SampleSimpleWebService"/>

          </Selected>

          <Channels>

          </Channels>

      </Container>

  2. Load the display profile into LDAP by using the dpadmin command.
  3. See Editing the Display Profile.

  4. Bring up the Desktop and verify that the tab was added.


Creating a Tab Within a Tab

This is similar to Adding a Tab to JSPTabContainer, except that instead of defining the tab based on JSPTableContainerProvider, you base the new tab on JSPTabContainerProvider.


Stretching a Tab Across an Entire Container

Figure 5-1 shows an example of a tab that spans an entire container. In this figure, the top-level container is a template tab container. Nested within it is a table container, and nested within that is a tab container, in which the tab spans the entire container.

Figure 5-1  Tab Spanning Entire Container

    To Stretch a Tab Across an Entire Container
  1. Edit the display profile and make the width of the Nested Tab Container full_top in the Table Container so that it stretches across the entire page.
  2. Load the display profile into LDAP by using the dpadmin command.
  3. See Editing the Display Profile.


Changing the Tab Image for JSP-based Tab Containers

You can customize the look of tabs as they use images.

    To Change the Tab Image for JSP-based Tab Containers
  1. Log in to the Sun Java System Identity Server administration console.
  2. Select Services from your Organization View pull-down menu and select Portal Desktop.
  3. Select Edit XML to directly edit the display profile XML fragment. Or,
    1. Select Manage Channels and Containers Link and Edit Properties for Display Profile.
    2. Select Global Themes and the theme you wish to modify.
  4. Change the value of the tabNotchImage property to the new image name.
  5. By default, the value for this property is tabNotch.gif.

  6. Copy the new image into portal-server-install-root/SUNWps/web-src/desktop/tabs/images directory.
  7. Run the portal-server-install-root/SUNWps/bin/deploy redeploy -deploy_admin_password password command to deploy the new image.
  8. Reload the Desktop to verify the change.


Changing the Color of Tabs

The background color of tabs are part of the themes.

    To Change the Color of Tabs
  1. Log in to the Sun Java System Identity Server administration console.
  2. Select Services from your Organization View pull-down menu and select Portal Desktop.
  3. Select Edit XML to directly edit the display profile XML fragment. Or,
    1. Select Container and Channel Management Link and Edit Properties for Display Profile.
    2. Select Edit Collection for Global Themes and the theme you wish to modify.
  4. Change the value of the titleBarColor property to change the color of the selected tab and/or change the value of tabColor property to change the color of an unselected tab.
  5. The selected tab background color is the same as the title bar color.

  6. Reload the Desktop to verify the change.


Making a Tab the Start Tab

The “Start tab” is the tab that is highlighted when user first logs in.

    To make the tab the start tab
  1. Edit the display profile for the appropriate container.
  2. Change the startTab property to the tab to highlight when the user logs in. For example:
  3. <String name="startTab" value="MyFrontPageTabPanelContainer"/>

  4. Load the display profile into LDAP by using the dpadmin command.
  5. See Editing the Display Profile.


Adding a Role-Based Tab

When you have a display profile that provides a set of JSP nested tabs, and you want a user who belongs to this role and another role to add an additional sub-tab, you can merge multiple display profiles to accomplish this. In the additional display profile, you specify the additional sub-tab in the like-named container for JSPTabContainer with merge=fuse and JSPTableContainer for the new tab.

    To Add a Role-based Tab
  1. To add a role-based tab for a user, define a role level display profile, which has the JSPTabContainer definition.
  2. Add the role-based tab to the available and selected list with merge=fuse in the channel definition for the table container.
  3. When the user is added to this role, the new tab is visible. The following display profile XML fragments show the role definitions.

    role1

    <Container name="JSPTableContainer" provider="JSPTableContainerProvider" merge="fuse">

        <Properties> ... </Properties>

        <Available> ... </Available>

        <Selected merge="fuse">

            <Reference value="Outages"/>

            <Reference value="SolarisAdmin"/>

            <Reference value="AdminTipoftheDay"/>

        </Selected>

    </Container>

    role2

    <Container name="Front" provider="front" merge="fuse">

        <Properties> ... </Properties>

        <Available> ... </Available>

        <Selected merge="fuse">

            <Reference value="Benefits"/>

            <Reference value="EmployeeNews"/>

        </Selected>

    </Container>

    The user belonging to both role1 and role2 receives the following display profile:

    Container name="JSPTableContainer" provider="JSPTableContainerProvider" merge="fuse">

        <Properties> ... </Properties>

        <Available> ... </Available>

        <Selected merge="fuse">

            <Reference value="Outages"/>

            <Reference value="SolarisAdmin"/>

            <Reference value="AdminTipoftheDay"/>

            <Reference value="Benefits"/>

            <Reference value="EmployeeNews"/>

        </Selected>

    </Container>


Adding a Channel to a User-defined Tab

Users can add a new tab to their Desktop by using the Tabs link and then by clicking the Make a New Tab link. The channel list that gets displayed on the content page which is shown when the user selects to create a new tab from scratch is picked up from the JSPTabCustomTableContainer’s Available list.



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.