JavaServer Faces 2.0 samples

The JavaServer Faces (JSF) 2.0 samples demonstrate three new features added to JSF 2.0: Ajax, templating, composite components. The samples show you how to create, process and render Ajax requests, along with using templates to create a standard layout for an application and composite components to create reusable components complete with their own converters, validators, renderers, and listeners.

Time required to set up and configure these samples

15 minutes

Prerequisites for use

  • WebSphere® Application Server Version 8.0 or Version 8.5
Important: These samples were tested with WebSphere Application Server Version 8.0 and Version 8.5.

Samples download

To use the samples, download JavaServer Faces 2.0 sample files from a product download site. Complete the following steps:

  1. Choose one of the following methods to download the JSF20.zip file to a directory on your workstation: FTP or HTTP. You might create the /samples/JSF20Samples directory path on your workstation and download JSF 2.0 sample files to that directory path.
  2. From the displayed dialog, specify the target directory to which to save the compressed file and click OK.
  3. The JSF20Samples.zip file contains sample files in the following directory structure:
    /images
    /installableApps
    /META_INF
    /scripts
    /src
    /style
    build.xml
    readme.html
    Attention: The readme.html file contains information for installing and running the sample.

Samples description

SampleAjax.war

Using Ajax in your application saves you from processing and rendering an entire page view for a particular action. You can update specific components by using an Ajax request to process and render only the necessary part of a view, using the f:ajax tag.

SampleTemplating.war

Templating is useful for applications with a common flow, such as a header and footer on each page. Using templating enables you to easily modify the content of your pages, while keeping the general layout the same. Composite components enable you to package JSF components with their own converters, validators, renderers, and listeners as one reusable component. This module shows you how to use templating and composite components in an application.

Concept topic    

Terms and conditions for product documentation | Feedback

Last updated: January 29, 2018 04:57 AM GMT-06:00
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-mp&topic=sample_jsf20
File name: sample_jsf20.html