/** Edit a decorative method.
  */
 public function editdecorationmethodAction()
 {
     if ($this->_getParam('id', false)) {
         $form = new DecMethodsForm();
         $form->submit->setLabel(self::UPDATE);
         $this->view->form = $form;
         if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) {
             if ($form->isValid($form->getValues())) {
                 $decs = new Decmethods();
                 $where = array();
                 $where[] = $decs->getAdapter()->quoteInto('id = ?', (int) $this->_getParam('id'));
                 $update = $decs->update($form->getValues(), $where);
                 $this->_flashMessenger->addMessage('Decoration method information updated!');
                 $this->_redirect($this->_redirectUrl . 'decorationmethods');
             } else {
                 $form->populate($form->getValues());
             }
         } else {
             $id = (int) $this->_request->getParam('id', 0);
             if ($id > 0) {
                 $decs = new Decmethods();
                 $dec = $decs->fetchRow('id=' . $id);
                 if (count($decs)) {
                     $form->populate($dec->toArray());
                 } else {
                     throw new Pas_Exception_Param($this->_nothingFound);
                 }
             }
         }
     } else {
         throw new Pas_Exception_Param($this->_missingParameter);
     }
 }