public function onInit($sender)
{
parent::onInit($sender);
if (!Prado::getApplication()->getCache()) {
if (!Prado::getApplication()->getSecurityManager()) {
throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely');
}
}
if (!is_writable(Prado::getPathOfNamespace($this->getTempPath()))) {
throw new TInvalidDataValueException("activefileupload_temppath_invalid", $this->getTempPath());
}
}