Java Reference
In-Depth Information
}
// This is the root cause message
return errorMessage;
}
public List<SeatPosition> getPositions() {
return Arrays.asList(SeatPosition.values());
}
}
The
TheatreSetupService
class is expected to complete the following tasks:
1. At first, the
TheatreSetupService
class produces a
SeatType
object
[1]
and exposes it to the JSF View layer using the
@Named
annotation.
Tip
This technique is a great addition provided by CDI since it removes the need to
create a boilerplate object,
SeatType
, to transport the information from the
view to the services. The
SeatType
object is produced by the controller and
will be populated by the JSF view and persisted by the
TheatreSetupSer-
vice
class.
2. It then drives user navigation between the application screens by returning to the
home page
[4]
.
3. We are done with the Java classes. You should now check to make sure that your
project structure matches the following screenshot: