Java Reference
In-Depth Information
}
public String createTheatre() {
ticketService.createTheatre(seatTypes);
conversation.begin(); [2]
return "book";
}
public String restart() {
ticketService.doCleanUp();
conversation.end(); [3]
return "/index"; [4]
}
public void create() throws Exception {
try {
ticketService.createSeatType(newSeatType);
FacesMessage m = new
FacesMessage(FacesMessage.SEVERITY_INFO,
"Done!", "Seats Added");
facesContext.addMessage(null, m);
initNewSeatType();
} catch (Exception e) {
String errorMessage =
getRootErrorMessage(e);
FacesMessage m = new
FacesMessage(FacesMessage.SEVERITY_ERROR,
errorMessage, "Error while saving data");
facesContext.addMessage(null, m);
}
}
private String getRootErrorMessage(Throwable
e) {
String errorMessage = "Registration failed.
See server log for more information";
while (e != null) {
Search WWH ::




Custom Search