ePages 7.38.0 - DE_EPAGES/RemoteSearch/API/Object/RemoteSearchPager.pm

Package DE_EPAGES::RemoteSearch::API::Object::RemoteSearchPager

Pager for remote search results. Items must be extra provided with $Pager->handleSearchResponse($SearchResponse) before you can execute $Pager->page()

Base
DE_EPAGES::Presentation::API::Object::Pager

Functions

countItems
handleSearchResponse
items
new

countItems

returns how many items should be paged.

Syntax
$Pager->countItems;
Return
$cItems (integer)
count items

handleSearchResponse

Extract 'Items' and 'ItemCount' from $hSearchResponse and calls $Pager->statistic(). $hSearchResponse is result from a $SearchClient->searchAsObject(...) call.
See DE_EPAGES::RemoteSearch::API::Object::SearchClient

Syntax
$Pager->handleSearchResponse( $hSearchResponse );
Input
$hSearchResponse (ref.hash)
search response

items

Load exsisting objects of current page. RemoteSearch may find deleted objects, in this case the Pager will discard these objects from result list. This may result in a smaller list than specified by PageSize

Syntax
my $aItems = $Pager->items();
Return
$aItems (ref.array)
array tied objects

new

Constructor to create RemoteSearchPager without items. You must call $Pager->handleSearchResponse($SearchResponse) to provide items.

Syntax
my $Pager = DE_EPAGES::RemoteSearch::API::Object::RemoteSearchPager->new( $hInfo );
Input
$hInfo (ref.hash)
parameters with keys
  • Servlet - servlet object
  • Page - page number (default=1)
  • PageSize - max. number of items per page (default=10)
  • PagerSize - max. number of pages in pager area (default=10)
  • OrderBy - sort attribute name (default='')
  • OrderDesc - sort direction (0=ascending, 1=descending, default=0)
  • UriParameters - additinal parameter that are included in
    the links, for example to next and previous page
    - ref-hash.string
Return
$Pager (object)
Pager object