/** * Method description * * More detailed method description * @param void * @return void */ function preRender() { $controller = Controller::getInstance(); $controller->getDispatcher()->addSubscriber("have_valuechecker", $this->getId()); $event = new WidgetEvent("echo_formid", $this->getId()); $event->setParams(array("formid" => $this->getId())); $controller->getDispatcher()->notify($event); $event = new WidgetEvent("echo_form_signature", $this->getId()); $event->setParams(array("signature" => $this->getSignature())); $controller->getDispatcher()->notify($event); $this->checkAndSetData(); parent::preRender(); if (!empty($this->inner_valuecheckers)) { foreach ($this->inner_valuecheckers as $k => $v) { if (($v = $controller->getValueChecker($k)) !== null) { $r = $v->getRules($this->getId()); if (!empty($r)) { //$this->vc_rules .= $r.", "; $this->vc_rules[] = $r; } $m = $v->getMessages(); if (!empty($m)) { //$this->vc_messages .= $v->getMessages(); $this->vc_messages[] = $v->getMessages(); } } } } if (strpos($this->getAction(), "http://") === false) { Controller::getInstance()->addSignature($this->getSignature()); } Controller::getInstance()->getDispatcher()->deleteSubscriber("echo_formid"); Controller::getInstance()->getDispatcher()->deleteSubscriber("echo_form_signature"); Controller::getInstance()->getDispatcher()->deleteEvent("echo_formid"); Controller::getInstance()->getDispatcher()->deleteEvent("echo_form_signature"); /* $controller->dispatcher->deleteSubscriber("valuechecker_puttosubmit",$this->id); $event = new CEvent(); $event->event_name = "valuechecker_getfunc"; $event->notifywidget_id = $this->id; $controller->dispatcher->notify($event); for($i = 0, $c = count($this->plain_on_submit); $i < $c; $i++) $this->javascript->addPlain("onsubmit",$this->plain_on_submit[$i]); for($i = 0, $c = count($this->conditional_on_submit); $i < $c; $i++) $this->javascript->addConditional("onsubmit",$this->conditional_on_submit[$i]); $this->javascript->addBeforeWidget($this->valuechecker_function); */ }
/** * Method description * * More detailed method description * @param void * @return void */ function preRender() { if (isset($this->valuechecker)) { $this->valuechecker->addWidgetId($this->getId()); $event = new WidgetEvent("have_valuechecker", $this->getId()); $event->setParams(array('id' => $this->valuechecker->getId())); Controller::getInstance()->getDispatcher()->notify($event); } parent::preRender(); if (POSTErrors::hasErrors()) { $this->restorePOST(); } }