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:
- Creating a Faces portlet project.
Rational Developer supports portlet development using both the IBM portlet API and the JSR 168 portlet API.
- Creating and modifying artifacts, including Faces-specific JSP and Java files, that are associated with a Faces portlet application.
You will use various wizards to generate these artifacts, which include Faces-specific JSP and Java files. Page Designer provides a familiar editing environment for Faces portlet JSP files.
- Designing the Faces portlet application.
Rational Developer provides several views that allow you to easily add and update Faces components to the portlet application: the Page Data view (shows the defined data sources), the Faces Components drawer in the Palette view (contains reusable UI components that can be bound to the data sources), and the Data drawer in the Palette view (enables you to drag data components such as JavaBeans and Web Services onto the page). You can also enable the Faces Clients Components, which support pages that contain both data and controls, by selecting the appropriate JSP model.
- Navigating to related artifacts and viewing the project in a logical manner, using the Project Explorer.
- Running and testing the Faces portlet application.
- Setting up related preferences, if necessary.
- Validating the project.
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:
- File Upload component (tag: hx:fileupload)
- 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