Advertisement
Guest User

Untitled

a guest
May 5th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. private void refresh() {
  2. ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
  3. try {
  4. ec.redirect(((HttpServletRequest) ec.getRequest()).getRequestURI());
  5. } catch (IOException e) {
  6. e.printStackTrace();
  7. }
  8. }
  9.  
  10. public void reserveBook(int id, boolean reserved) {
  11. System.out.println(id + " " + reserved);
  12. libraryManager.setBookReservation(id, reserved);
  13. refresh();
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement