Methods Summary |
---|
public java.lang.String | checkBookIn()
Book book = getBook(); // get the current book
book.setCheckedOut(false);
return null;
|
public java.lang.String | checkBookOut()
Book book = getBook(); // get the current book
book.setCheckedOut(true);
return null;
|
public com.oreilly.jent.jsf.library.model.Book | getBook()
if (currentBookID == null) return null;
return (Book)getLibrary().getBooks().get(currentBookID);
|
public javax.faces.model.SelectItem[] | getBookList()
Library library = Directory.getLibrary();
List books = library.getBookList();
SelectItem[] items = new SelectItem[books.size()];
for (int i = 0; i < books.size(); i++) {
Book book = (Book)books.get(i);
items[i] = new SelectItem(book.getTrackingID(), book.getTitle());
}
return items;
|
public java.lang.String | getCurrentBookID()
return currentBookID;
|
public com.oreilly.jent.jsf.library.model.Library | getLibrary()
return library;
|
public boolean | isBookSelected()
return currentBookID != null;
|
public void | safeModeChange(javax.faces.event.ValueChangeEvent event)
UIComponent buttonHolderGrid =
event.getComponent().findComponent("buttonHolder");
if (buttonHolderGrid != null) {
Object newVal = event.getNewValue();
if (newVal instanceof Boolean)
buttonHolderGrid.setRendered(!((Boolean)newVal).booleanValue());
}
|
public void | setCurrentBookID(java.lang.String currentBookID)
this.currentBookID = currentBookID;
|
public void | setLibrary(com.oreilly.jent.jsf.library.model.Library library)
this.library = library;
|