Пример #1
0
 /**
  * Saves item count in viewstate.
  * This method is invoked right before control state is to be saved.
  */
 public function saveState()
 {
     parent::saveState();
     if ($this->_items) {
         $this->setViewState('ItemCount', $this->_items->getCount(), 0);
     } else {
         $this->clearViewState('ItemCount');
     }
 }
Пример #2
0
 /**
  * Saves items into viewstate.
  * This method is invoked right before control state is to be saved.
  */
 public function saveState()
 {
     parent::saveState();
     if ($this->_items) {
         $this->setViewState('Items', $this->_items->saveState(), null);
     } else {
         $this->clearViewState('Items');
     }
 }