Property Inspector - Portlet Tag (adfp:portlet)

Use the Portlet Tag to add a portlet from a registered producer to a portal page.

The portlet tag is bound to a portlet binding through the value attribute. The portlet binding is an ADFm executable binding. The portlet component uses the portlet binding to which it is bound to interact with the remote portlet through the portlet container.

Use the adfp:portlet tag to specify the portlet's attributes and attribute values.

Example

<adfp:portlet value="#{bindings.portlet1}"                                       
                         id="portlet1"/>

Attributes of the adfp:portlet tag

Some attribute values are relevant when support for the attribute is built into the portlet. For example, you may set isAboutModeAvailable to true, but if no About mode has been defined for the portlet, the attribute setting does not affect the portlet.

The adfp:portlet tag uses nine categories of attributes:

Common Attributes

Attribute Value Description
Id Enter a text string to use as the portlet's unique identifier. For example:

id="newsBrief"

Specifies the unique identifier for the component on the page. This attribute is populated with a unique value by default when you add the component.
  • The identifier must follow a subset of the syntax allowed in HTML:

  • Must not be a zero-length String.

  • First character must be an ASCII letter (A-Za-z) or an underscore ('_').

  • Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').

Title Enter a text string to use as the portlet's header title. For example:

title="Announcements"

Specifies the portlet title, which is displayed in the portlet header.

The title attribute value specified in the <adfp:portlet> tag takes precedence over any title specified elsewhere (for example, in the portlet markup).

If no value is specified, the portlet extracts its title from the portlet markup (response).

If neither the title attribute in the <adfp:portlet> tag nor the portlet markup is available, the title is extracted from the portlet definition.

Note: Supplying a value to the title attribute at design time means that any change made to the title at runtime in Edit or Edit Defaults mode will be ignored.

Width A number expressed in pixels or as a percentage of available area.
  • For pixels, enter npx, for example 300px.

  • For percentage, enter n%, for example 50%.

Specifies the width of the area to allow for portlet display.

If the actual portlet width is larger than the width value entered here, if the displayScrollBar attribute is set to auto or true, a scroll bar is provided to view the portlet.

Height A number expressed in pixels, for example 300px. Specifies the height of the area to allow for portlet display.

If the actual portlet height is larger than the height value entered here, if the displayScrollBar attribute is set to auto or true, a scroll bar is provided to view the portlet.

Icon Enter the URI to an image. For example:

icon="coffee.png"

In Oracle JDeveloper, click the down arrow and select Edit to locate and select the required image. The URI provided in this example is stored at the document root; therefore, a full path is not required. An image that is not stored at the document root requires a full path, for example:

icon="c:\portal\images\box_b.gif"

Or:

icon="http://source-pc/images/accessability.gif"

Provides a URI specifying the location of an icon to display to the left of the portlet title in the portlet header. This can be used to indicate the portlet's purpose, to reinforce branding, as a content indicator, or for some other reason.
PartialTriggers Enter the ID of one or more components that trigger a partial update. For example:

partialTriggers="_id1,_id2 componentID5"

Specifies the IDs of components that trigger a partial update. The portlet listens on the specified trigger components. If one of the trigger components receives a trigger event that causes it to update in some way, this portlet also requests to be updated.

Separate component IDs in the PartialTriggers attribute with spaces.


Appearance Attributes

Attribute Value Description
ShortDesc Enter a text string. For example:

shortDesc="Portlet for entering display text in place."

Specifies a short description of the portlet.
Background dark/light/medium

default: medium

Lets you apply a different look and feel to each portlet on a portal page. The default skins, Oracle, Minimal, and Simple, and custom skins include three versions of style selectors: light, medium, and dark. Depending on which value is specified for the background property, the skin will apply the relevant style/icon selector version.
DisplayHeader true/false

default: true

Indicates whether the portlet's header is displayed.
  • true - The header is displayed. Consequently, header-based menus and icons are displayed.

  • false - The header is not displayed, and menus and icons normally displayed in the header are hidden. If isSeededInteractionAvailable is set to true, the user can access portlet menus and icons by rolling the mouse over the portlet. A fade-in/fade-out toolbar displays, from which users can select Actions menu options.

DisplayShadow true/false

default: true

Specifies whether a shadow must be cast by the chrome of the Show Detail Frame component.
DisplayScrollBar true/false/auto

default: auto

Displays a scroll bar if content does not fit the width or height specified (auto).

A value of true always renders a scroll bar. A value of false never renders a scroll bar. If the portlet exceeds the values expressed for width or height, these values are ignored and the portlet renders in its actual size.

ExpansionMode minimized/normal

default: normal

Specifies the default state of the portlet. Select from:
  • minimized - The portlet's default display mode is collapsed (minimized).

  • normal - The portlet's default display mode is normal. That is, it is neither collapsed nor expanded to the width of the page.

AllModesSharedScreen true/false/auto

default: auto

Determines whether a change in portlet mode renders the new mode on a new page, other than the page on which the portlet resides.
  • auto - All portlet modes are displayed inline if the remote portlet is configured, through the com.oracle.portlet.requireIFrame container runtime option in its portlet.xml file, to require an inline frame (IFRAME). This ensures that Oracle JSF Portlet Bridge portlets are displayed inline.

  • true - All portlet modes are displayed inline. One mode is swapped out for another on the same page. In other words, this attribute enables all portlet modes to display without leaving the context of a given page.

  • false - All portlet modes, except View (JSR 168) or Show (PDK-Java), are rendered each on their own page. This is useful for portlets such as OmniPortlet, which require that modes other than Show mode display on pages other than the page on which the portlet resides.

RenderPortletInIFrame true/false/auto

default: auto

Determines whether the portlet is rendered in an inline frame (IFRAME) More:
  • true - The portlet is always rendered in an IFRAME.

  • auto - Whenever possible, the portlet consumer attempts to rewrite the portlet markup so that it renders correctly in an ADF page. Otherwise, the portlet is rendered in an IFRAME.

  • false - The portlet is never rendered in an IFRAME.

Rendered true/false

default: true

Specifies whether the component is rendered. When set to false, no output is rendered.

It is recommended that you retain the default value, as setting rendered to false will cause problems when you run the page.


Actions Attributes

Attribute Value Description
DispayActions onHover/always

default: always

Specifies whether seeded interactions for the portlet will be shown at all times, or when you move the mouse over the portlet.
ShowMoveAction menu/none

default: menu

Renders the Move command on the portlet's Actions menu.
ShowRemoveAction menu/none

default: chrome

Renders the Remove command on the portlet's Actions menu.
ShowResizer always/never

default: always

Specifies whether a resize handle must be displayed on the lower right corner of the portlet. You can alter only the height of a portlet while resizing it.
ShowMinimizeAction chrome/none

default: chrome

Renders a Minimize icon on the chrome of the portlet in an application.

Behavior Attributes

Attribute Value Description
PartialTriggers Enter the ID of one or more components that trigger a partial update. For example:

partialTriggers="_id1,_id2 componentID5"

Specifies the IDs of components that trigger a partial update. The portlet listens on the specified trigger components. If one of the trigger components receives a trigger event that causes it to update in some way, the portlet also requests to be updated.

In the partialTriggers tag, components are separated from each other by a space.

SubmitUrlParameters true/false

default: false

Portlet links that point to the page on which the portlet is situated force a page to submit itself rather than just reload with the link URL. By default, the parameters in this URL are not made available to the page. Rather, they are available only inside the portlet initiating the request.

Setting submitUrlParameters to true makes these URL parameters available on the container page as well.


Portlet Modes Attributes

Attribute Value Description
IsAboutModeAvailable true/false

default: true

Renders an About command on the portlet's Actions menu in an application. Users select About to invoke the portlet's About mode.
IsConfigModeAvailable true/false

default: true

Renders a Configure command on a JSR 168 portlet's Actions menu in an application. Users select Configure to open the portlet's Configuration settings.
IsCustomizeModeAvailable true/false

default: true

Renders a Customize command on the portlet's Actions menu in an application. Customize mode allows site administrators to edit a portlet's default personalization data.
IsDetailModeAvailable true/false

default: true

Renders a Details command on the portlet's Actions menu in an application. Users select Details to open the portlet's Details page.

This attribute maps to the Show details page mode in Oracle PDK-Java portlets. It has no application in standards-based (JSR 168) Java portlets.

IsHelpModeAvailable true/false

default: true

Renders a Help command on the portlet's Actions menu in an application. Users select Help to open the portlet's Help page.
IsPrintModeAvailable true/false

default: true

Renders a Print command on a JSR 168 portlet's Actions menu that displays a printer-friendly version of the portlet.
IsNormalModeAvailable true/false

default: true

Renders a Refresh command on the portlet's Actions menu in an application. Users select the Refresh command and the portlet refreshes (that is, redraws) independent of any other content on the page (also known as a partial-page refresh)
IsPersonalizeModeAvailable true/false

default: true

Renders a Personalize command on the portlet's Actions menu in an application. Users select Personalize to alter their personal view of the portlet. This mode is equivalent to the Edit mode selection in the Standards-Based Java Portlet (JSR 168) Wizard.

The Personalize command displays on the Actions menu only to authenticated users (that is, users who are logged in). It does not display to public or unauthenticated users. You must implement some form of application security for users to be able to personalize their portlet views.

Note: A typical personalization setting is Portlet Title. You can set Portlet Title at design-time, by providing a value for the text attribute of the adfp:portlet tag. Consider however that supplying a value to the text attribute at design-time prevents personalization and customization of the Portlet Title at runtime.

IsPreviewModeAvailable true/false

default: false

Provides a means of previewing portlet content.

Style Attributes

Attribute Value Description
contentStyle The name of a CSS style Specifies the CSS style to apply to portlet content. Manually enter any attributes that are in compliance with, at least, CSS 2.0. Such attributes take the following format in the adfp:portlet tag:

contentStyle="color:rgb(255,0,255); font-family:Arial Helvetica Geneva sans-serif;font-size:large;"

The values you enter for contentStyle affect portlet content. You can also specify the style to apply to the whole portlet using the inlineStyle attribute. Where both attributes have conflicting values, contentStyle takes precedence.

For example, when you set a background-color using inlineStyle, the portlet and its content are set in the color specified. However, if you set different background colors for contentStyle and inlineStyle, the portlet header is styled by the inlineStyle color, while portlet content is styled by the contentStyle color.

Unlike inlineStyle, you can use contentStyle to turn portlet borders off. For example:

contentStyle:border-style:none;

inlineStyle The name of a CSS style Specifies the CSS style to apply to the portlet. In addition to the attributes provided, you can manually enter attributes for inlineStyle that do not appear on the Property Inspector's attribute list, as long as those attributes are in compliance with, at least, CSS 2.0. Such attributes take the following format in the adfp:portlet tag:

inlineStyle="color:rgb(255,0,255);font-family:Arial Helvetica Geneva sans-serif;font-size:large;"


Binding Attributes

Attribute Value Description
Binding The name of a managed bean. For example:

binding="#{managedBean.Binding}"

In Oracle JDeveloper, click the down arrow and select the Edit icon to select a managed bean and specify the relevant managed bean property.

Specifies the binding reference to store the component instance. The binding reference binds an instance of the portlet to a managed bean property. Managed beans are any JavaBeans used by the application that are registered in the JSF faces-config.xml file.

Customization Attributes

Attribute Value Description
Customization allowed true/false

default: true

Specifies whether customizations are allowed on this component.
Customization Allowed by Text string Specifies the roles for which customization is enabled.

Other Attributes

Attribute Value Description
CustomizationId Do not set This attribute has been deprecated and may be removed in a future release.
IframeDtd loose/none/strict

default: loose

Determines if document type definition (DTD) is specified in the doctype declaration.
Text Do not set Set at runtime to determine the title to be displayed in the portlet chrome. The value for this attribute comes from the remote portlet but can be overridden by the user-specified title attribute.