Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Reference > Program model > Control DataObject


PageControl DataObject

PageControl enables the application to retrieve additional pages of search results.

The structure of a PageControl data object consists of:

size

indicates the size of the page.

cookie

contains the cookie returned from a PageResponseControl to enable the server to get the next page to the search. For the first call of a paging search, this property is not be set to any value.

If the countLimit property is specified for SearchControl, PageControl cannot be used. They are mutually exclusive.


XML schema definition

The following is the XML schema definition for the PageControl DataObject:

<xsd:complexType name="PageControl">
<xsd:complexContent>
<xsd:extension base="Control">
<xsd:attribute name="size" type="xsd:int"/>
<xsd:attribute name="cookie" type="xsd:hexBinary"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType> 


Sample data objects

The following is a sample PageControl data object used in th search API for the first page. There is no cookie property in this data object. It indicates to return only 10 results, even if the search results are greater than 10.

<controls xsi:type="PageControl" size="10"/> 

The following is a sample PageControl data object used in the search API for the subsequent page. The cookie property returned from a PageResponseControl is set.

<wim:controls xsi:type="wim:PageControl"
     cookie="57494D53656172636843616368654E616D6574696D653A31313239353538343136383636"
     size="10"/> 

The following is a sample PageControl data object used in the search API to indicate to stop the search.

To stop the paging search results, set the page size to 0 with the cookie set.

<wim:controls xsi:type="wim:PageControl"
   cookie="57494D53656172636843616368654E616D6574696D653A31313239353538343136383636"
   size="0"/> 

Parent topic: Control DataObject



+

Search Tips   |   Advanced Search