When an error is thrown in a Table class such as:
Code:
if (trim($this->desc) == '') {
$this->setError(JText::_('MAND_COINDESC'));
return false;
}
Which was called from a store() method of a Model:
Code:
// Validate
if (!$row->check()) {
$this->setError($row->getErrors());
return false;
}
Which was called from a controller:
Code:
if ($model->store($post)) {
$msg = JText::_( 'DETAILSAVED' );
} else {
$msg = JText::_( 'DETAILSAVEERROR' );
}
...
$this->setRedirect( $link,$msg );
Where do the error messages set in the table check() method display?
The page (list of items) shows the 'Error Saving xxx' message, but the details set in the check method are not propagated up to the view it seems.
Anybody have the right code to make the magic happen?