A provider must be defined in the display profile before it can be used. This definition associates the provider with its class file implementation and includes the provider’s properties. That is, the provider’s display profile fragment should include default values for all the properties that are used in the provider.java file. For example, if the provider.java file contains getStringProperty(“color”), the provider’s display profile fragment should include a default value for color.
The provider’s XML fragment in the display profile must adhere the following structure:
<DisplayProfile> <Providers> <Provider name=” providername” class=” provider class name”> <Properties>...</Properties> </Provider> </Providers> </DisplayProfile> |
The provider definition is the template that decides the properties for the provider’s channels. However, the display profile definition for the channel ultimately decides the values for the channel’s properties. When a channel sets a property, the property is set in the channel and not in the provider’s properties. When defining channel properties in the display profile, include only those properties where the provider defaults are not applicable.
The provider’s channel XML fragment in the display profile must adhere the following structure:
<DisplayProfile> <Channels> <Channel name=” channelname” provider=” providername”> <Properties>...</Properties> </Channel> </Channels> </DisplayProfile> |
The channel definition in the display profile need not have the <Container> tag unless the channel is defined within a container. Channel definitions in the display profile can be encapsulated inside a container. The advantage of this is that it provides name scoping so that channels with the same name do not collide.
Unless a channel is referenced directly from the DesktopServlet URL, in which case it need not be encapsulated inside a container, you must reference a channel from some container in order to see it.
The container within which the channel will operate must adhere the following structure:
<DisplayProfile> <Channels> <Container> <Properties>...</Properties> <Available>...</Available> <Selected>...</Selected> <Channel>...</Channel> </Container> </Channels> </DisplayProfile> |
To upload display profile changes, use the psadmin add-display-profile or psadmin modify-display-profile sub command. See Sun Java System Portal Server 7.2 Technical Reference for more information on the psadmin command and see the Portal Server 7.2 administration console online help for more information on administering the display profile.
The developer needs to edit the display profile document and specify the <Container> and <Provider> display profile elements where applicable. The tags that should be modified are:
<Provider name="provider" class="provider class"> <Container name="container" provider="provider"> |
For JSP files, the <Properties> tag for the provider contains the following property tag, which references the JSP Content page:
<String name="contentPage" value="value"> |
The <Properties> tag for the channel can have values that override the properties set in the <Provider> tag. Thus, if desired, you could set the JSP contentPage value here. You do not reference template-based providers, or other providers you might develop, in this way.
The <Available> and <Selected> tags are required for all containers in the display profile.
The JSP-based tab, table, and frametab containers have additional properties requirements.
There is a distinction between a provider element in the display profile and the Java class for the provider.
<Provider name="JSPTableContainer" class=com.sun.portal.providers.containers.jsp.table.JSPTableContainerProvider> |
com.sun.portal.providers.containers.jsp.table.JSPTableContainerProvider |
You can modify display profile objects by performing one of the following:
Using the Portal Server software administration console to download the display profile and uploading it after modifying it.
Manually editing an existing display profile document and then loading it at the appropriate LDAP node by using the psadmin modify-display-profile subcommand.
Creating a new display profile document from scratch and then loading it at the appropriate LDAP node by using the psadmin add-display-profile subcommand.
For more information on display profile and the psadmin sub-commands to manage the display profile, see the Sun Java System Portal Server 7.2 Command-Line Reference.
The display profile document for the Enterprise Sample exist at DNs similar to the following:
o=EnterpriseSample,dc=siroe,dc=com |
Load the display profile at the appropriate LDAP node using the psadmin sub-commands. You can also use the Edit Display Profile XML from the Portal Server software management console using the two links to download the display profile and upload the display profile. Download the display profile, make the necessary changes, and then upload it again through the Portal Server software management console.
See the Sun Java System Portal Server 7.2 Command-Line Reference for more information on the psadmin sub-commands.