Java Reference
In-Depth Information
</h:dataTable>
</div>
</div>
</div>
</ui:define>
Each time you add a new block of seats to your theatre, the
dataTable
method con-
tained 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
TheatreSetupService
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">
<div class="page-header">
<h2>TicketBooker Machine</h2>
</div>
<h3>Money: $ #{bookerService.money}</h3>
<h:form id="reg">
<h:messages styleClass="messages"
style="list-style: none; padding:0; margin:0;"
errorClass="alert alert-error" infoClass="alert
alert-success"
warnClass="alert alert-warning"
globalOnly="true" />
<h:commandButton id="restart"
action="#{theatreSetupService.restart}"
value="Restart Application" class="btn
btn-default" />
<h:dataTable var="seat" value="#{seats}"
rendered="#{not empty seats}"
styleClass="table table-hover table-striped ">