JavaServer Faces portlet applications

Faces-based application development can be applied to portlets, similar to the way that Faces development is implemented in Web applications. Faces support in the Rational® Software Delivery Platform simplifies the process of writing Faces portlet applications and eliminates the need to manage many of the underlying requirements of portlet applications.

The following high-level list of activities are involved in developing Faces portlet applications:

Rational tools provide a set of wizards that help you create Faces portlet-related artifacts. In many cases, these wizards are identical to the wizards used to create standard Faces artifacts. For more information, refer to the standard Faces documentation and

F1 help for additional usage details.

 

Limitations for Faces portlet development

The following items are known limitations for Faces portlets in the current release:

Binary data download is not supported for Faces components

The following components that support the download of binary data are not currently enabled (although they are available in a non-portal Faces environment):

  • Image (tag: hx:graphicImageEx) when bound to data, as in:

    <hx:graphicImageEx value="#(myBean.photo)"></hx:graphicImageEx>

  • Link (tag: hx:outputLinkEx), when bound to data, as in:

    <hx:outputLinkEx value="#(myBean.resume)"></hx:outputLinkEx>

  • Media Player (tags: hx:playerGenericPlayer, hx:playerFlash, hx:playerMediaPlayer, hx:playerRealPlayer, hx:playerShockwave), when bound to data, as in:

    <hx:playerGenericPlayer value="#(myBean.movie)"></hx:playerGenericPlayer>

Document root-relative URL is not supported for the Image component

When adding an

Image component to a Faces portlet page, specify the URL relative to the document directory, rather than relative to the document root directory. For example, if the URL value attribute is specified as follows:

<hx:graphicImageEx value="/.YourPortlet/theme/yourimage.gif"></hx:graphicImageEx>
where .YourPortlet is the document root property of the portlet project, then the image will not display when you run the portlet. Instead, you should specify the URL value in the following way:

<hx:graphicImageEx value="theme/yourimage.gif"></hx:graphicImageEx>
where theme/yourimage.gif is document-relative.

Faces portlets will not run on portal pages that have anonymous user access

To run a Faces portlet on a portal page that uses anonymous user access, set the public.session parameter to true in the NavigatorService.properties file.

JSPR 168 custom portlet tags cannot be used within the <view> tag without a snippet added.

Some JSR 168 portlet API custom tags (<namespace>, <actionURL>, etc.) cannot be used within the <view> tag of a Faces portlet JSP file. Snippets from Snippets view for Faces portlet JSP files need to be inserted after the <view> tag.

Use the ActionnResponse#setPortletMode() to change the portlet mode.

Changing the portlet mode using the 'portletMode' attribute of <actionURL> causes the Faces portlet to fail to store data and invoke an action. As an alternative, use ActionResponse#setPortletMode() in the Faces action to change the portlet mode

 

Related concepts

Markup languages

Creating Faces portlets and projects

Portlet APIs

 

Related tasks

Creating Faces portlet projects

Creating portlets

Creating portlet JSP files

Adding and updating Faces portlet modes for existing IBM portlets

Inserting images in portlet JSP files