directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neha Rawat <nneharaw...@gmail.com>
Subject Re: Getting a Sorted result by setting SortControl
Date Mon, 10 Nov 2014 04:26:34 GMT
With JNDI, I defined the sortKey like this --
            String sortKey = "cn";
            javax.naming.ldap.SortKey[] skis = new
javax.naming.ldap.SortKey[1];
            skis[0] = new javax.naming.ldap.SortKey(sortKey,true,null);
            SortControl sortControl = new SortControl(skis,
Control.CRITICAL);
            ctx.setRequestControls(new Control[] { sortControl });

But I get the same exception in this case too.
Have not tried with LDAP API yet.

On Mon, Nov 10, 2014 at 12:58 AM, Emmanuel Lécharny <elecharny@gmail.com>
wrote:

> Le 09/11/14 19:38, Neha Rawat a écrit :
> > Thanks. Looking forward to the release.
> > Is there a workaround for this which I can use meanwhile?
> Yes : use the LDAP API, and always set the reverseOrder flag (to false
> in your case). With JNDI, it's a bit complicated, but it should wok if
> you define a SortKey where you specify the sort order (but that is ti be
> tested).
>
>


-- 
Love and Luck,
Neha

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message