protected function actionPage()
    {
        list($selected, $action, $value) = $this->getPostedAction();

        $deleted = $updated = 0;

        foreach ($selected as $page_id) {

            if ($this->access('page_edit')) {
                if ($action === 'status') {
                    $updated += (int) $this->page->update($page_id, array('status' => $value));
                } else if ($action === 'blog_post') {
                    $updated += (int) $this->page->update($page_id, array('blog_post' => $value));
                }
            }

            if ($action === 'delete' && $this->access('page_delete')) {
                $deleted += (int) $this->page->delete($page_id);
            }
        }

        if ($updated > 0) {
            $this->setMessage($this->text('Updated %num item(s)', array('%num' => $updated)), 'success');
        }

        if ($deleted > 0) {
            $this->setMessage($this->text('Deleted %num item(s)', array('%num' => $deleted)), 'success');
        }
    }