Java Reference
In-Depth Information
TABLE 7-2. Allowable Connections Between Scoped Objects
Be sure not to allow cyclical references between objects. For example, neither of the
Ad-
dressBean
objects in the preceding example should point back to the
CustomerBean
object, because
CustomerBean
already points to the
AddressBean
objects.
Initializing Maps and Lists
In addition to configuring
Map
and
List
properties, you can also configure a
Map
and a
List
directly so that you can reference them from a tag rather than referencing a property
that wraps a
Map
or a
List
.
Registering Application Messages
Application messages can include any strings displayed to the user, as well as custom error
messages (which are displayed by the
message
and
messages
tags) for your custom
converters or validators. To make messages available at application startup time, do one
of the following:
• Queue an individual message onto the
javax.faces.context.FacesContext
instance programmatically, as de-
• Register all the messages with your application using the application configuration
resource file
Here is the section of the
faces-config.xml
file that registers the messages for the
Duke's Bookstore case study application:
<application>
<resource-bundle>
<base-name>dukesbookstore.web.messages.Messages</base-name>
<var>bundle</var>