protected function prepareExecute()
{
parent::prepareExecute();
$this->useTransaction(true);
if (isset($this->data['id'])) {
$this->record->load($this->data['id']);
}
$this->catid = $this->input->get('category');
$this->category = new CategoryRecord();
$this->category->load($this->catid);
$this->data['category_id'] = $this->catid;
}