Ejemplo n.º 1
0
  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);
  }
Ejemplo n.º 2
0
 public String selectBook(Book selectedBook) {
   this.selectedBook = selectedBook;
   return Navigation.Catalog.searchBooks(selectedBook);
 }