TPagedList class
TPagedList implements a list with paging functionality.
TPagedList works in one of two modes, managed paging or customized paging, specified by CustomPaging.
- public function fetchData($sender,$param)
- {
- $offset=$param->Offset; // beginning index of the data needed
- $limit=$param->Limit; // maximum number of data items needed
- // get data according to the above two parameters
- $param->Data=$data;
- }
- $count=$list->Count;
- for($index=0;$index<$count;++$index)
- echo $list[$index];
- foreach($list as $index=>$item) // traverse each item in the list
The PageSize property specifies the number of items in each page. To access different page of data in the list, set CurrentPageIndex or call nextPage(), previousPage(), or gotoPage(). The total number of pages can be obtained by PageCount.
Located in /Collections/TPagedList.php (line 58)
TComponent | --TList | --TPagedList
Class | Description |
---|---|
TSqlMapPagedList | TSqlMapPagedList implements a list with paging functionality that retrieves data from a SqlMap statement. |
Constructor.
Changes to a page with the specified page index.
Returns the item at the specified offset.
This method is exactly the same as offsetGet.
Switches to the next page.
Returns whether there is an item at the specified offset.
This method is required by the interface ArrayAccess.
Returns the item at the specified offset.
This method is required by the interface ArrayAccess.
Raises OnFetchData event.
This event is raised each time when the list changes to a different page and needs the new page of data. This event can only be raised when CustomPaging is true.
Raises OnPageIndexChanged event.
This event is raised each time when the list changes to a different page.
Switches to the previous page.
Inherited From TList
TList::__construct()
TList::add()
TList::clear()
TList::contains()
TList::copyFrom()
TList::count()
TList::getCount()
TList::getIterator()
TList::getReadOnly()
TList::indexOf()
TList::insertAt()
TList::itemAt()
TList::mergeWith()
TList::offsetExists()
TList::offsetGet()
TList::offsetSet()
TList::offsetUnset()
TList::remove()
TList::removeAt()
TList::setReadOnly()
TList::toArray()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:35:46 -0400 by phpDocumentor 1.3.0RC4