Developing Components and Integration Code
The component writer develops all application-specific Java code needed for the user interface, ranging from simple classes that tie the user interface to the application backend code developed by the application developer to custom user interface components when the ones provided by JSF aren’t sufficient.
Figure 2-2 shows the main classes and interfaces used by the newsletter application.
![]() |
You probably recognize the Subscriber class from
the previous section. The component writer develops the
SubscriberHandler class, as shown in this section.
All the other classes in Figure 2-2 are provided by
the JSF implementation.
The UIComponentBase class is the base class for
all JSF UI components. Subclasses represent specific interface
elements, such as text fields, links and buttons, labels, menus and
selection lists. JSF includes a set of component classes that can be
used right out of the box, such as the ones shown in Figure 2-2, but a component writer can also implement
custom components if needed. The UIInput class
represents an input field and lets you bind the component to an
application model through a value binding. When a component is rendered, it pulls its value from the application model object based on this value binding. Similarly, when an input component processes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
