Java Reference
In-Depth Information
$ #{_seatType.price}
</h:column>
<h:column>
<f:facet
name="header">Quantity</f:facet>
#{_seatType.quantity}
</h:column>
</h:dataTable>
</h:form>
</ui:define>
As you can see, this view contains in the topmost section a form for entering a new
seat type. The highlighted input texts will actually pass data to the SeatType object,
which will be transferred to the TicketController CDI Bean and ultimately per-
sisted when the user clicks on the Add button.
Each time you add a new block of seats to your theatre, the dataTable contained
in the lower part of the screen will be updated. When you are done with your setup,
click on the Finish button, which will recall the finish method of the TicketCon-
troller CDI Bean, creating the list of seats.
This action will also redirect you to the next view, named book.xhtml , which is
used to book seats.
<ui:define name="content">
<h1>TicketBooker Machine</h1>
<h:form id="book">
<h3>Money: $ #{bookerService.money}</h3>
<h:messages errorClass="error"
infoClass="info" globalOnly="true" />
<h:panelGrid columns="1" border="1"
styleClass="smoke">
<h:dataTable var="_seat" value="#{seats}"
rendered="#{not empty seats}"
styleClass="simpletablestyle">
Search WWH ::




Custom Search