Example #1
0
 private function _initvalidator()
 {
     $ajax = new t41_Ajax();
     $ajax->setStatus(t41_Ajax::NOK);
     if (isset($_POST['obj'])) {
         /* @var $obj t41_Form_Mask */
         $obj = t41_Core::cacheGet($_POST['obj']);
         $deco = t41_View_Decorator::factory($obj);
         foreach ($deco->getJsArgs() as $key => $val) {
             $ajax->addData($key, $val);
         }
         $ajax->setStatus(t41_Ajax::OK);
     } else {
         $ajax->setMessage("Unavailable Cached Object");
     }
     header('Content-Type: application/json; charset=UTF-8');
     echo $ajax;
     exit;
 }