In Example 6-1, the components save their current value and redisplay it when the page is reloaded. That's great, but in order for the backend code to get the values, it would need to locate the corresponding user interface components and ask them for their values. That would introduce an undesirable dependency between the user interface and the backend code.
To solve this problem, JSF lets you bind components directly to
JavaBeans properties of any application class as well as to elements
of an array or
 entry. When the component is rendered, it reads
the property or element value and renders it; when a request is
processed, it sets the property or element value to the current
component value. This way, the backend code doesn't
need to know anything about the user interface—it just works
with the properties of the application model classes.
A JSF application typically uses two types of classes with JavaBeans properties: the real application beans representing application concepts and what I call "glue beans," which sit between the real application beans and the user interface. Others call the latter a "backing bean" or "code-behind file," but it all means the same thing.
Example 6-2. Parts of the ReportHandler class
package com.mycompany.expense; ...