public String searchBooks() { bookResults = null; try { bookResults = catalogService.searchBooks(title, author, publisher); if (bookResults.isEmpty()) { MessageFactory.info("org.books.Bookstore.NO_BOOKS_FOUND"); } } catch (InvalidCriteriaException ex) { Logger.getLogger(CatalogBean.class.getName()).log(Level.SEVERE, null, ex); MessageFactory.error("org.books.Bookstore.MISSING_SEARCH_CRITERIA"); return Navigation.Catalog.searchBooks(bookResults); } return Navigation.Catalog.searchBooks(bookResults); }
public String selectBook(Book selectedBook) { this.selectedBook = selectedBook; return Navigation.Catalog.searchBooks(selectedBook); }