RichFaces

# Getting started

## Environment Configuration

In order to download, build, modify, and deploy the Photo Album application you need the following installed and configured:

- JDK 1.5 and higher

- Maven 2.0.10

- JBoss Tools (or Eclipse)

- JBoss Server (4.2.3.GA, 5.0.x.GA)

- SVN client

## Installation

Once you have configured the environment you can install the Photo Album application:

- Checkout the project

      svn co http://anonsvn.jboss.org/repos/richfaces/trunk/examples/photoalbum/

- Build the project. Open command line console, point to the folder with checkouted project, and tell Maven:

      mvn clean install eclipse:eclipse -Dwtpversion=1.5

- Import the project into your IDE. You can just deploy Photo Album application onto the server, but the convenient way is to import the project into your IDE. We recommend Eclipse with JBoss Tools since this bundle is more preferable to ensure rapid development process with Seam and RichFaces. You can find a step-by-step tutorial "Importing existing projects" at the Eclipse documentation page or simply in the Help > Help Contents of the Eclipse. As the result three modules of Photo Album project appear in the Workspace:

  Modules of Photo Album in the Workspace

- Add JBoss AS. Now you need to add JBoss Application Server runtime. Detailed instructions on how you can do it are given in the Runtimes and Servers in the JBoss AS plugin chapter from the JBoss Server Manager Reference Guide.

- Run photoalbum-ear-1.0-SNAPSHOT on the JBoss Application Server you have just installed.

- Browse to `http:/localhost:8080/photoalbum`.

Tip:

By default Photo Album is assembled with a limited set of images (4-5 in each album). In order to build the version of the application with a full set of images you need to use livedemo profile while building Photo Album like this:

    mvn clean install -Plivedemo

## Running Functional(Selenium) Tests

Before starting Selenium test please make sure that you have Firefox browser installed on your local machine and since the Photo Album application is designed to be deployed and run on JBoss Application server, so please make sure that the <jboss.installer.url> property of the project pom.xml (`examples/photoalbum/`) points to a existing JBoss Application server copy.

You also need to build the Photo Album project in `inexamples/photoalbum/reource`.

Then, you need to go to the test folder of the project (examples/photoalbum/test/) and run the

    ...
    mvn clean integration-test
    ...

By default Selenium tests are executed in the Firefox browser, hence you need to have it installed. If you configured everything like it is said above you will see tests being executed in the Firefox browser. When the tests are finished you can read test reports in the `examples/photoalbum/tests/target/surefire-reports/` folder.

## Context Help

The Photo Album appellation was developed in the first place to demonstrate the mighty power of RichFaces thus most of UI elements in the application has a context help article that tells how a particular element works, providing technical details about it. A context help article is displayed when you click on the question mark icon ( ).