Ejemplo n.º 1
0
 /**
  * Loads viewstate into this control and its children.
  * This method is overriden to load the items data from view state.
  * If the items data is not empty, it will be used to 
  * populate the repeater (to restore the previous view).
  * @param array viewstate to be loaded
  */
 public function loadViewState($viewState)
 {
     parent::loadViewState($viewState);
     $items = $this->getViewState('Items', array());
     if (count($items) > 0) {
         $this->setDataSource($items);
         $this->dataBind(false);
     }
 }
Ejemplo n.º 2
0
 public function loadViewState($viewState)
 {
     if (isset($viewState[1])) {
         if (!is_null($this->masterPage)) {
             $this->masterPage->loadViewState($viewState[1]);
         }
         unset($viewState[1]);
     }
     parent::loadViewState($viewState);
 }