O'Reilly logo

JavaServer Faces by Hans Bergsten

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sample Application Overview

The sample application is a web-based expense report system. Employees enter their expense reports and submit them for approval; a manager looks at the reports and either accepts or rejects them. All users have to log in before they can access the application.

The main user interface consists of a single screen, shown in Figure 5-1. Employees and managers both use this screen, but different options are enabled depending on who’s logged in.

The expense reports screen
Figure 5-1. The expense reports screen

The screen is divided into three main areas: a menu area at the top, a report list area to the left, and a report details area to the right. The menu area contains buttons for operations that affect the report displayed currently in the report details area. Its content differs depending on whether the user is an employee or a manager. An employee gets buttons for creating a new report, deleting the current report, and submitting the current report for approval. The buttons are enabled or disabled depending on the report’s status. For instance, as long as the report has the status New (i.e., no entries have been added to it yet), all buttons are disabled; when at least one entry has been added (status Open), all buttons are enabled; when the report has been submitted (status Submitted), only the New button is enabled. If a manager is logged in, the menu area contains additional buttons ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required