Sun Java logo     Previous      Contents      Index      Next     

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

Chapter 6
Customizing Channels

This chapter describes how to customize channels. This chapter contains the following sections:

See the Portal Server Administration Guide for instructions on adding a channel to the Desktop.


Customizing Channel Refresh Times and Container Caching

The refreshTime property controls how often a channel’s content is reloaded. When refreshTime is set to 0 (the default) for the container, the browser refresh (or reload) causes the page to be reloaded and the getContent() method is called again for every channel.

The following applies to a single channel:

The following applies to controlling and configuring container caching:


Customizing Window Preference

For channels that include links that launch another browser, you can control how this browser window is opened.

    To Customize the Channel Window Preference
  1. Define the display profile (either for the channel, to make the change for only that channel, or for the provider, to make the change for every channel that uses the provider) so that it includes the windowPref property.
  2. For example:

    <Properties>

        ...

        <String name="windowPref" value="all_new"/>

        ...

    </Properties>

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


    Note

    The intelligence has to be built with the help of JavaScript for that particular channel. Out of the box, this is supported by BookmarkProvider only.



Removing a Button

    To Remove a Button From All Channels in a Container
  1. Find the container you want to work with. If you are working with one of the sample portals, you need to modify the appropriate “contained” container, which is part of the top-level container. See Chapter 4, "Internally Used Containers."
  2. Add the appropriate property (within the <Properties> </Properties>) tags from Table 6-1 to the container’s display profile for the button you want to remove. This two column table lists the button in the first column and the property to hide the button in the second column.
  3. The order of the buttons in this table corresponds to the order they appear in the channel, from left to right: Minimize, Maximize, Help, Edit, Detach, and Remove.

    Table 6-1  Channel Buttons and Corresponding Properties  

    Button

    Property to Hide the Button

    Minimize

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

    Maximize

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

    Help

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

    Edit

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

    Detach

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

    Remove

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


    Note

    For the Help and Edit buttons, You must insert the respective property for each channel. You cannot insert the property within the container’s <Properties> </Properties> tags.


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

    To Remove a Button From a Single Channel
  1. For the channel from which you want to remove a button, add the appropriate property to a Collection tag in the container that contains the channel. See Table 6-2, for the button you want to remove. This two column table lists the button in the first column and the property to hide the button in the second column
  2. The order of the buttons in this table corresponds to the order they appear in the channel, from left to right: Minimize, Maximize, Help, Edit, Detach, and Remove.

    Table 6-2  Channel Buttons and Corresponding Properties  

    Button

    Property to Hide the Button

    Minimize

    <Collection name="channelsIsMinimizable">

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

    </Collection>

    Maximize

    <Collection name="channelsIsMaximizable">

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

    </Collection>

    Detach

    <Collection name="channelsIsDetachable">

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

    </Collection>

    Remove

    <Collection name="channelsIsRemovable">

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

    </Collection>

  3. For the channel in which you want to remove a button, add the appropriate property to a Collection tag in the controlling container.
  4. For example, use the following XML to hide the Remove button for the Sample JSP channel in the JSP table container, MyFrontPageTabPanelContainer, whose container is JSPTabContainer.

    <Container name="MyFrontPageFramePanelContainer" provider="JSPTableContainerProvider">

        <Properties>

            ...

            <Collection name="channelsIsRemovable">

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

            </Collection>

        </Properties>

        ...

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


Changing the Channel Layout for a Table Container

    To Change the Channel Layout for a Table Container
  1. You can change the layout for a particular table container by modifying (or adding) the following property in the table container’s display profile:
  2. <Integer name="layout" value="value"/>

  1. Reload the display profile to LDAP by running the dpadmin with the modify command, loading it at the top-most node in the directory by using the -g option.
  2. For example:

    dpadmin modify -u "uid=amAdmin,ou=People,dc=sesta,dc=com" -w password -g dp-providers.xml


    Note

    You can also use the Sun Java System Identity Server software administration console Channel and Container Management link for the Desktop service to change the channel layout.



Removing the Title Bar from a Channel

    To Remove the Title Bar from a Channel
  1. Add the following to the table container display profile in which the channel is present.
  2. <Collection name="channelsHasFrame">

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

    </Collection>

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


Changing the Channel Border Width

    To Change the Border Width for all Channels in a Container
  1. Change directories to the appropriate table container (JSPFrameCustomTableContainerProvider, JSPTabCustomTableContainerProvider, or JSPTableContainerProvider) for which you want to change the border width.
  2. For example:

    cd /etc/opt/SUNWps/desktop/default/JSPTableContainerProvider

  3. Edit the leafWrapper.jsp file.
  4. Change the cellpadding to not use the borderWidth property from theme. The line to change is:

    CELLPADDING=<dttheme:getAttribute name="borderWidth"/>

    For example, you might use CELLPADDING=2 in place of this line.

  5. Run the touch command on the tablecolumn.jsp file, which includes leafWrapper.jsp.
  6. touch tablecolumn.jsp


    Note

    You can also change the borderWidth property for the GlobalThemes Collection. This changes the width of the channel borders for a theme. Users can then select the theme from the Themes page. (This method removes the need to change JSPs.) After making the change to the display profile, which in the sample portal is dp-org.xml, you need to upload it to LDAP.



Customizing the Channel Border

    To Customize Channel Borders to Have Bevelled Edges, Shadows, Curved Corners, and So On
  1. Change directories to the appropriate table container (JSPFrameCustomTableContainerProvider, JSPTabCustomTableContainerProvider, or JSPTableContainerProvider) for which you want to customize the border width.
  2. For example:

    cd /etc/opt/SUNWps/desktop/default/JSPTableContainerProvider

  3. Edit leafWrapper.jsp.
  4. Change the appropriate HTML. You change border width and color by modifying the following lines:

    CELLPADDING=<dttheme:getAttribute name="borderWidth"/>

    BGCOLOR="<dttheme:getAttribute name="borderColor"/>"

    To add curved borders, shadows, and so on, you use a combination of image maps and tables. While possible, such an example is beyond the scope of this document.

  5. Run the touch command on the tablecolumn.jsp file, which includes leafWrapper.jsp.
  6. touch tablecolumn.jsp



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.