Java Reference
In-Depth Information
private List<Seat> seats;
@Produces
@Named
public List<Seat>getSeats() {
return seats;
}
This
dataTable
object will be displayed only if it contains some data in it (as dictated
by the
not empty seats
EL expression). In one of the
dataTable
columns, we
have added
commandButton [4]
that will be used to book the seat displayed on that
row. Notice one of the JSF 2 goodies here, as we call the
bookSeat
method of
TheatreBooker
passing an argument as one parameter, which is the
seatId
field.
JSF 2 facet suggestions
By enabling JSF 2 facets on your project configuration, you can enjoy some additional be-
nefits while designing your views.
Enabling JSF 2 project facets takes half a minute. Right-click on your project and navigate
to
Properties
|
Project Facets
. Then, select the
JSF 2.2 Project facets
checkbox and
click on the
OK
button:
