If many records are returned, you can specify a paging control, using the PaginationControl complex type.
A query to the Oracle Endeca Server may return more records than can be displayed all at once. A common user interface mechanism for overcoming this is to create pages of results, where each page displays a subset of the entire result set.
The RecordList in the Results response includes pagination controls (the PaginationControl type) that you can use for paging.
<cs:ContentElement xsi:type="cs:RecordList" Id="RecordList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cs:NumRecords>19</cs:NumRecords> <cs:TotalPages>7</cs:TotalPages> <cs:RecordRange First="1" Last="3"/> <cs:RecordListEntry> ... </cs:RecordListEntry> <cs:PaginationControl Label="First" Active="false"> <cs:Operator OwnerId="RecordList" Page="0" xsi:type="cs:PageOperator"/> </cs:PaginationControl> <cs:PaginationControl Label="Previous" Active="false"> <cs:Operator OwnerId="RecordList" Page="-1" xsi:type="cs:PageOperator"/> </cs:PaginationControl> <cs:PaginationControl Label="1" Active="false"> <cs:Operator OwnerId="RecordList" Page="0" xsi:type="cs:PageOperator"/> </cs:PaginationControl> <cs:PaginationControl Label="2" Active="true"> <cs:Operator OwnerId="RecordList" Page="1" xsi:type="cs:PageOperator"/> </cs:PaginationControl> <cs:PaginationControl Label="3" Active="true"> <cs:Operator OwnerId="RecordList" Page="2" xsi:type="cs:PageOperator"/> </cs:PaginationControl> <cs:PaginationControl Label="Next" Active="true"> <cs:Operator OwnerId="RecordList" Page="1" xsi:type="cs:PageOperator"/> </cs:PaginationControl> <cs:PaginationControl Label="Last" Active="true"> <cs:Operator OwnerId="RecordList" Page="6" xsi:type="cs:PageOperator"/> </cs:PaginationControl> ... </cs:ContentElement>
<ContentElementConfig xsi:type="RecordListConfig" HandlerFunction="RecordListHandler" HandlerNamespace=""http://www.endeca.com/MDEX/conversation/1/0" Id="RecordList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RecordsPerPage>5</RecordsPerPage> </ContentElementConfig>
<cs:NumRecords>20</cs:NumRecords>
<Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PageOperator" OwnerId="RecordList" Page="3"/>
<cs:TotalPages>1</cs:TotalPages>then no paging controls are needed.
Page Label | Result |
---|---|
First | Goes to the first record page (which is page 0). |
Previous | Goes to the previous record page. |
Next | Goes to the next record page. |
Last | Goes to the last record page. |
1 | Goes to the first record page (which is page 0). |
2 or greater | Goes to the Nth record page. |
Note that the Active attribute in a PaginationControl element indicates whether that paging control is relevant within the context of the current state. For example, if you are on the last record page, then neither the Next or Last paging controls will be active.