Java Reference
In-Depth Information
Invoking a Managed Bean
To enable a composite component to handle server-side data, you can invoke a managed
bean in one of the following ways:
• Pass the reference of the managed bean to the composite component.
• Directly use the properties of the managed bean.
The example application described in “ The compositecomponentlogin Example
Application on page 89 shows how to use a managed bean with a composite component
by passing the reference of the managed bean to the component.
Validating Composite Component Values
JavaServer Faces provides the following tags for validating values of input components.
These tags can be used with the composite:valueHolder or the compos-
ite:editableValueHolder tag.
Table 5-2 lists commonly used validator tags.
TABLE 5-2. Validator Tags
The compositecomponentlogin Example Application
The compositecomponentlogin application creates a composite component that
accepts a user name and a password. The component interacts with a managed bean. The
component stores the user name and password in the managed bean, retrieves the values
from the bean, and displays these values on the Login page.
The compositecomponentlogin application has a composite component file, a us-
ing page, and a managed bean.
Search WWH ::




Custom Search