Changeset 1515 for branches/3.0
- Timestamp:
- 11/26/2006 02:09:44 PM (2 years ago)
- Location:
- branches/3.0
- Files:
-
- 2 modified
-
HISTORY (modified) (1 diff)
-
framework/Web/UI/WebControls/TPager.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/HISTORY
r1512 r1515 5 5 BUG: TTableCell should render only when Text is not set and there's no child (Qiang) 6 6 BUG: global state was not saved when redirect() is invoked (Qiang) 7 BUG: TPager would not display if it was invisible previously (Qiang) 7 8 ENH: Ticket#446 - Added TMetaTagCollection.getMetaTagByID method (Qiang) 8 9 CHG: Ticket#437 - __autoload is replaced by spl_autoload_register (Qiang) -
branches/3.0/framework/Web/UI/WebControls/TPager.php
r1397 r1515 52 52 const CMD_PAGE_LAST='Last'; 53 53 54 private $_pageCount=0; 55 54 56 /** 55 57 * Restores the pager state. … … 269 271 throw new TConfigurationException('pager_controltopaginate_invalid',$controlID); 270 272 271 if($targetControl->getAllowPaging() && $targetControl->getPageCount()>1)272 { 273 $this->setVisible(true);273 if($targetControl->getAllowPaging()) 274 { 275 $this->_pageCount=$targetControl->getPageCount(); 274 276 $this->getControls()->clear(); 275 277 $this->setPageCount($targetControl->getPageCount()); … … 278 280 } 279 281 else 280 $this->setVisible(false); 282 $this->_pageCount=0; 283 } 284 285 /** 286 * Renders the control. 287 * The method overrides the parent implementation by rendering 288 * the pager only when there are two or more pages. 289 * @param THtmlWriter the writer 290 */ 291 public function render($writer) 292 { 293 if($this->_pageCount>1) 294 parent::render($writer); 281 295 } 282 296
