Portlet Properties

This topic describes the properties you can set on portlets in the Portal and Portlet designers.

Portlet Properties in the Portal Designer

Portlet Properties in the Portlet Designer

Portlet Properties Not Supported in the IDE

The term "hint" in the property descriptions means available capabilities that are not supported in the default skeletons provided with the WebLogic Workshop Portal Extensions.

Portlet Properties in the Portal Designer

When you select a portlet instance in the Portal Designer (as opposed to opening the .portlet source file), the following properties appear in the Property Editor window.

Title Required. Enter a title only if you want to override the default title provided by the .portlet file. The title is used in the portlet titlebar.
Instance Label Required. A single portlet, represented by a .portlet file, can be used multiple times in a portal. Each use of that portlet is a portlet instance, and each portlet instance must have a unique ID, or Instance Label. A default value is entered automatically, but you can change the value. Instance Labels are necessary for inter-portlet communication between Java Page Flow portlets. Also, portlets must have Instance labels for entitlements and delegated administration.
Portlet URI Required. The path (relative to the project) of the parent .portlet file. For example, if the file is stored in <project>\myportlets\my.portlet, the Portlet URI is /myportlets/my.portlet.
Theme Optional. Select a theme to give the portlet a different look and feel than the rest of the desktop.
Orientation

Optional. Hint to the skeleton to position the portlet titlebar on the top, bottom, left, or right side of the portlet. You must build your own skeleton to support this property. Following are the numbers used in the .portal file for each orientation value: top=0, left=1, right=2, bottom=3.

Change the value for this property only if you want to override the default orientation provided by the .portlet file.

Default Minimized Optional. Select "true" for the portlet to be minimized when it is rendered. The default value is "false." Change the value for this property only if you want to override the default value provided by the .portlet file.

Portlet Properties in the Portlet Designer

When you open a portlet in the Portlet Designer, the following properties appear in the Property Editor window:

JSP Content
Content URI Required. The path (relative to the project) to the JSP or HTML file to be used for portlet's content. The Content URI was set when the portlet was created. You can use this property to point to a different file. For example, if the content is stored in <project>/myportlets/my.jsp, the Content URI is /myportlets/my.jsp.
Error Page URI Optional. The path (relative to the project) to the JSP or HTML file to be used for the portlet's error message if the main content cannot be rendered. For example, if the error page is stored in <project>/myportlets/error.jsp, the Content URI is /myportlets/error.jsp.
Backing File

Optional. If you want to use a class for preprocessing (for example, authentication) prior to rendering the portlet, enter the fully qualified name of that class. That class should implement the interface com.bea.netuix.servlets.controls.content.backing.JspBacking or extend com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking.

See the Tutorial Portal in the Portal Samples for examples of backing files.

Thread Safe

Optional. Performance setting for books, pages, and portlets that use backing files.

When Thead Safe is set to "true," an instance of a backing file is shared among all books, pages, or portlets that request the backing file. You must synchronize any instance variables that are not thread safe.

When Thread Safe is set to "false," a new instance of a backing file is created each time the backing file is requested by a different book, page, or portlet.

Portlet Properties
Title Required. Enter the title that will appear in the portlet's titlebar. You can override this title in each instance of the portlet (in the Portal Designer).
Orientation Optional. Hint to the skeleton to position the portlet titlebar on the top, bottom, left, or right side of the portlet. You must build your own skeleton to support this property in the .portal file. Following are the numbers used in the .portal file for each orientation value: top=0, left=1, right=2, bottom=3.

You can override the orientation in each instance of the portlet (in the Portal Designer).

Description Optional. A short text description of the portlet. The description is displayed in the Administration Portal and Visitor Tools areas, and will be sent from a WSRP producer.
Packed

Optional. Rendering hint that can be used by the skeleton to render the portlet in either expanded or packed mode. You must build your own skeleton to support this property.

When packed="false" (the default), the portlet takes up as much horizontal space as it can.

When packed="true," the portlet takes up as little horizontal space as possible.

From an HTML perspective, this property is most useful when the window is rendered using a table. When packed="false," the table's relative width would likely be set to "100%." When packed="true," the table width would likely remain unset.

Definition Label Required. Unique identifier for the portlet. A default value is entered automatically, but you can change the value. Each portlet must have a unique Definition Label. Definition Labels can be used to navigate to portlets. Also, components must have Definition Labels for entitlements and delegated administration.
Default Minimized Required. Select "true" for the portlet to be minimized when it is rendered. The default value is "false."
Render Cacheable

Optional. To enhance performance, set to "true" to cache the portlet. For example, portlets that call Web services perform frequent, expensive processing. Caching Web service portlets greatly enhances performance.

Do not set this to "true" if you are doing your own caching.

Cache Expires (seconds) Optional. When the "Render Cacheable" property is set to "true," enter the number of seconds in which the portlet cache expires.
Fork Render Optional. Intended for use by a portal administrator when configuring or tuning a portal. Setting to "true" tells the framework that it should attempt to multithread render the portlet. This property can be set to true only if the "Forkable" property is set to "true."
Fork Render Timeout (seconds) Optional. Allows you to set a timeout value for rendering. If Fork Render is set to "true," you can set a timeout attribute to indicate that the portal framework should wait only as long as the timeout value for each fork render portlet. The default value is -1 (no timeout). When a portlet rendering times out, an error is logged, but no markup is inserted into the response for the timed-out portlet.
Forkable Optional. Lets a portlet developer determine whether or not the portlet is allowed to be multithread rendered. When set to "true," a portal administrator can use the "Fork Render" property to make the portlet multithread rendered.
Client Classifications

Optional. Select the multichannel devices in which the portlet can be viewed. The dialog list of devices comes from <project>\WEB-INF\client-classifications.xml.

In the Manage Portlet Classifications dialog:

  1. Select whether you want to enable or disable classifications for the portlet.
  2. Move the client classifications you want to enable or disable from the Available Classifications to the Selected Classifications, and click OK.

When you disable classifications for a portlet, the portlet is automatically enabled for the classifications you did not select for disabling.

Event Handlers Optional. Use this value to configure inter-portlet commmunication via portlet events. The default is "No event handlers." Click the Browse button if you want to select or add an event handler.
Offer as Remote Optional. Defines whether the portlet is accessible using the WSRP producer. The default is "true," which allows the portlet to be accessed.
Portlet Titlebar
Icon URI Optional. The path (relative to the project) to the graphic to be used in the portlet titlebar. You must create a skeleton to support this property.
Help URI Optional. The path (relative to the project) to the portlet's help file.
Edit URI Optional. The path (relative to the project) to the portlet's edit page.
Can Maximize Optional. If set to "true," the portlet can be maximized.
Can Minimize Optional. If set to "true," the portlet can be minimized.
Can Delete Optional. If set to "true," the portlet can be deleted from a page.
Can Float Optional. If set to "true," the portlet can be floated into a separate window.
Page Flow Content
Page Flow Action Optional. The initial action to be executed in a page flow. If not specified, the "begin" action will be used.
Page Flow Refresh Action Optional. The action to be executed in the page flow when the page is refreshed but the portlet is not targeted. This is equivalent to using portlet event handlers configured on the "onRefresh" portal event to invoke the page flow action.
Listen To Optional. The comma-separated list of instance labels of the portlets whose actions should also be called in the selected page flow portlet.
Request Attribute Persistence
(none, session, transient-session)

Optional. This attribute controls attribute persistence for Page Flow and Struts portlets. The default is "session," where request attributes populated by a Page Flow or Struts action are persisted into a collection class that is placed into a session attribute so that the portal framework can safely include the forwarded JSP on subsequent requests without re-running the action. Using the "session" value can result in session memory consumption and replication that would not otherwise occur in a standalone Page Flow or Struts application. The "transient-session" value places a serializable wrapper class around a Hashmap into the session. The "none" value performs no persistence operation.

Portlets that have the "transient-session" value applied generally have the same behavior as existing portlets; however, in failover cases, the persisted request attributes will disappear on the failed-over-to server. In the failover case, you must write forward JSPs to handle this contingency gracefully by, at a minimum, not expecting any particular request attribute to be populated; ideally you should include the ability to either repopulate automatically or present the user with a link to re-run the last action to repopulate the request attributes. For non-failover cases, request attributes will be persisted, providing a performance advantage for non-postback portlets identical to default "session" peristence portlets.

Portlets that have the "none" value applied will never have request attributes available on refresh requests; you must write forward JSPs to assume that they will not be available. You can use this option to completely remove the framework-induced session memory loading for persisted request attributes.

Mode Properties (Available when you add a mode to a portlet)
Content URI Required. The path (relative to the project) to the JSP or HTML file to be used for portlet's mode content, such as the edit page. For example, if the content is stored in <project>/myportlets/editPortlet.jsp, the Content URI is /myportlets/editPortlet.jsp.
Backing File

Optional. If you want to use a class for preprocessing (for example, authentication) prior to rendering the portlet's mode page (such as the edit page), enter the fully qualified name of that class. That class should implement the interface com.bea.netuix.servlets.controls.content.backing.JspBacking or extend com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking.

See the Tutorial Portal in the Portal Samples for examples of backing files.

Error URI Optional. The path (relative to the project) to the JSP or HTML file to be used for the error message if the portlet's mode page cannot be rendered. For example, if the error page is stored in <project>/myportlets/errorPortletEdit.jsp, the Content URI is /myportlets/errorPortletEdit.jsp.
Name Enter the name of the mode, such as "Edit".
Visible Optional. Makes the mode icon (such as the edit icon) in the titlebar or menu invisible (false) or visible (true). Set Visible to "false" when, for example, you want to provide an edit URL in a desktop header.
Presentation Properties
Presentation Class
Presentation ID
Presentation Style
Skeleton URI
See Properties for All Portal Components.
Content Presentation Style

Optional. The primary uses are to allow content scrolling and content height-setting.

For scrolling, enter one of the following attributes:

  • overflow-y:auto - Enables vertical (y-axis) scrolling
  • overflow-x:auto - Enables horizontal (x-axis) scrolling
  • overflow:auto - Enables vertical and horizontal scrolling

For setting height, enter the following attribute:

height:200px

where 200px is any valid HTML height setting.

You can also set other style properties for the content as you would using the Presentation Style property. The properties are applied to the component's content/child <div> tag.

Content Presentation Class

Optional. The primary uses are to allow content scrolling and content height-setting.

For scrolling, enter a stylesheet class that uses one of the following attributes:

  • overflow-y:auto - Enables vertical (y-axis) scrolling
  • overflow-x:auto - Enables horizontal (x-axis) scrolling
  • overflow:auto - Enables vertical and horizontal scrolling

For setting height, enter a stylesheet class that uses the following attribute:

height:200px

where 200px is any valid HTML height setting.

You can also set other style properties for the content as you would using the Presentation Class property. The properties are applied to the component's content/child <div> tag.

Portlet Properties Not Supported in the IDE

The attributes described below are available in WebLogic Portal 8.1 with Service Pack 4, but cannot be implemented from the WebLogic Workshop interface. Instead, you must manually insert them into the respective .portlet file.

forkPreRender

Enables forking (multi-threading) in the preRender lifecycle phase. preRender forking is supported by these portlet types:

  • JSP
  • Page Flow
  • JSR168
  • WSRP (Consumer portlets only)

Setting forkPreRender to true indicates that the portlet’s preRender phase should be forked.

To implement forkPreRender, see the instructions in How Do I: Enable the forkPreRender Attribute?

forkPreRenderTimeout

Takes an integer value and sets the timeout value, in seconds, for the forked preRender phase. This attribute is applied only if forkPreRender=”true”. If the time to execute the forked preRender phase exceeds the timeout value, the portlet itself times out (that is, the rest of the lifecycle phases for this portlet are aborted), the portlet is removed from the page where it was to be displayed, and an error level message is logged that looks similar to the following example:

<May 26, 2005 2:04:05 PM MDT> <Error> <netuix>
<BEA-423350> <Forked render timed out for portlet
with id [t_portlet_1_1_1]. Portlet will not be included in
response.>

To implement forkPreRenderTimeout, see the instructions in How Do I: Enable the forkPreRenderTimeout Attribute?

 

 

Related Topics