Java Reference
In-Depth Information
As you can see, both the
inputText
field and the button are bound to underlying beans
using binding expressions . The
inputText
field is bound to the
amount
field of
a bean named
bid
. This means that the text field displays the value of the bound bean
field and any value entered into the text field is automatically set into the bean field. The
Place Bid button is bound to the
placeBid
method of a bean named
bidManager
. This
means that the bound method is automatically invoked when the button is clicked. The next
listing shows code that the JSF page elements are bound to.
Listing 2.5.
BidManager
CDI-managed bean
The
BidManager
component isn't an EJB but simply a CDI-managed bean. This means
that other than lifecycle, dependency injection, and context management, no enterprise ser-
vices such as transaction management are available directly to the
BidManager
compon-