public function update()
 {
     if (isset($_REQUEST['bookmark_id'])) {
         try {
             $bookmark = new Bookmark($_REQUEST['bookmark_id']);
         } catch (\Exception $e) {
             $_SESSION['errorMessages'][] = $e;
             header('Location: ' . BASE_URL . '/bookmarks');
             exit;
         }
     } else {
         $bookmark = new Bookmark();
     }
     if (isset($_POST['requestUri'])) {
         $bookmark->handleUpdate($_POST);
         try {
             $bookmark->save();
             // Bookmarks are always created in place.
             // So, the Uri for the bookmark is the same Uri to
             // go back to the previous screen.
             header('Location: ' . $bookmark->getFullUrl());
             exit;
         } catch (\Exception $e) {
             $_SESSION['errorMessages'][] = $e;
         }
     }
     $this->template->blocks[] = new Block('bookmarks/updateForm.inc', array('bookmark' => $bookmark));
 }