protected function processPostData($postData, $beforeLoad) { $this->_isLoadingPostData = true; if ($beforeLoad) { $this->_restPostData = new TMap(); } foreach ($postData as $key => $value) { if ($this->isSystemPostField($key)) { continue; } else { if ($control = $this->findControl($key)) { if ($control instanceof \Prado\Web\UI\IPostBackDataHandler) { if ($control->loadPostData($key, $postData)) { $this->_controlsPostDataChanged[] = $control; } } else { if ($control instanceof IPostBackEventHandler && empty($this->_postData[self::FIELD_POSTBACK_TARGET])) { $this->_postData->add(self::FIELD_POSTBACK_TARGET, $key); // not calling setPostBackEventTarget() because the control may be removed later } } unset($this->_controlsRequiringPostData[$key]); } else { if ($beforeLoad) { $this->_restPostData->add($key, $value); } } } } foreach ($this->_controlsRequiringPostData as $key => $value) { if ($control = $this->findControl($key)) { if ($control instanceof \Prado\Web\UI\IPostBackDataHandler) { if ($control->loadPostData($key, $this->_postData)) { $this->_controlsPostDataChanged[] = $control; } } else { throw new TInvalidDataValueException('page_postbackcontrol_invalid', $key); } unset($this->_controlsRequiringPostData[$key]); } } $this->_isLoadingPostData = false; }