Author Topic: How to sort data when reterving the result from CMOD  (Read 2600 times)

Karthikkumark

  • Guest
How to sort data when reterving the result from CMOD
« on: November 05, 2013, 11:49:38 PM »
Hi All,
Please help how we sort the reult based on the particular column in the odwek?

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: How to sort data when reterving the result from CMOD
« Reply #1 on: November 08, 2013, 03:13:58 AM »
Hello Karthik,

Well it depends... :-D

You have 3 type of sorting possibility in CMOD:

- Server based sort
- Client based sort (ODWEK is also a client :-))
- No sorting at all

So with ODWEK, you "force" one of the 3 sorting method, or you can tell ODWEK to do what the CMOD Admin choose for a folder.

For that you have the following methods:

ODFolder.getSortLocation()
ODFolder.setSortLocation(char)

Cases:
Server side sorting
   Now, if you have selected the server side, then the result will be sorted according to the folder sorting preferences, you cannot change anything here.
  But you can of course change the order of sorting if needed, after receiving the rows, for example if a user is clicking on the columns field, then you will need to do the sort accordingly :-) And for that you need to implement your own sorting method/class/...

Client side sorting
  If you have, then you are in charge to sort the data you receive. You need to implement a sorting class/method/...
  You are also in charge to make sure that the wish of the sort definition in the folder is done as the CMOD Admin wants it.
  But you can of course change the order of sorting if needed, for example if a user is clicking on the columns field, then you will need to do the sort accordingly :-)


JSorter (http://jsorter.sourceforge.net/) project might help you for sorting data. I've used it successfully in some projects.

I hope that helps a little bit :-)

Sincerely yours,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML