I am providing server side pagination in user interface while showing all active directory record. I have first, next , previous and last button to traverse in record. I am using SimplePagedResultsControl from unboundid sdk which very rich in pagination. but some how i do not know how to jump directly on last page. Please suggest.
Asked
Active
Viewed 437 times
0
-
http://grepcode.com/file/repo1.maven.org/maven2/com.unboundid/unboundid-ldapsdk/2.3.3/com/unboundid/ldap/sdk/controls/SimplePagedResultsControl.java useful page – Rachel Gallen Jun 17 '14 at 19:23
-
There's no code to get the last page but there's code to indicate if there's more to come. I still think you can use the cookie=' ' to get the last page – Rachel Gallen Jun 17 '14 at 19:25
1 Answers
0
The simple paged results control does not provide this capability. It only allows you to iterate through the results in order from beginning to end. You can't specify an arbitrary starting point.
The virtual list view control (which the LDAP SDK also supports) does provide the ability to retrieve arbitrary pages from the result set, identifying the start of the page using either a numeric offset or a sort value. However, not all servers support this control, and many of those that do support it require special indexing.

Neil Wilson
- 1,706
- 8
- 4
-
I have both combination virtual list view and simple page which decided upon is server supporting it or not. As my most client's ldap might not support virtual view list. is there any way that i can identify no of record present in given OU. ( considering performance hit - no separate request for fetch all children) – lalit Jun 17 '14 at 19:29
-
The simple paged results response control can include the total number of entries matching the search criteria, and the LDAP SDK's implementation of the control provides a getSize method which can access that. However, according to RFC 2696, the size returned can be an estimate, and the server may return a size of zero if it doesn't know the actual result set size. So whether or not the size is actually available and how accurate the estimate is may depend on what server you're using and the characteristics of the search (e.g., whether it's indexed). – Neil Wilson Jun 17 '14 at 22:49