AnsweredAssumed Answered

Sort using SearchParameters

Question asked by on Jan 13, 2009
Latest reply on Jan 14, 2009 by
Hi all,

We are having web form for creating Divisions. In my webscript I iterate our all the webforms using following query:

SearchParameters sp = new SearchParameters();         

StringBuffer strBfrQuery = new StringBuffer();

String strQname = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "title").toString();
sp.addSort(strQname, true);

I am expecting the resultset to return the sorted results on Title. But its giving random results that are not sorted.

I also tried sorting based on division name which is one of the property we index out of the Webform
If I add following line it gives null pointer exception

And if I add following line

sp.addSort("{}divisonName',true); It gives me same defult order. Means not what I m expecting the sort on divisionName.

Neither of this is working fine.

Can anyone help me out in this to understand what m i doing wrong. M i missing anything…

Thanking you in andvance.