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. The Faces support in Rational Developer 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 Developer provides a set of wizards that help you create Faces portal-related artifacts. In many cases, these wizards are identical to the wizards used to create standard Faces artifacts. Please refer to the Rational Developer 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:

Use of WebSphere Data Objects (WDOs) is limited to prototyping

Because WDOs are not supported for WebSphere Portal 5.0.x, applications that rely on WDO components should not be used in a production environment. However, the current tooling does supply this capability for prototyping purposes. When you attempt to add a WDO component (a relational record or a relational record list) to a Faces JSP file, a warning about this limitation is supplied.

File upload and binary data download are not supported for Faces components

The following Faces portlet components are not currently enabled:

  1. File Upload component (tag: hx:fileupload)

  2. Components that support the download of binary data (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.

 

Related concepts

Dynamic data using Faces components
Creating Faces portlets and projects
Portlet APIs

 

Related tasks

Creating Faces portlet projects
Creating Faces applications - overview

Related reference
Faces components reference
Attributes for Faces components