You are on page 1of 2

Implementing Pagination in IBM MDM

Before you start implementing the pagination feature for your search functionality I recommend you to explore the pagination facility for one of the existing search service. For eg: searchFSParty

Note that inside the <dwlcontrol> I had placed a few things extra. <pagestartindex>1</pagestartindex> <pageendindex>3</pageendindex> <returnavailableresultcount>true </returnavailableresultcount> Example 1 If the pageStartIndex is 1, the pageEndIndex is 10, and the total result count is 16, then 10 records will be returned in the first subset, and 6 records will be returned in the second subset. Example 2 If the pageStartIndex is 1, the pageEndIndex is 10, and the total result count is 8, then the pageEndIndex is considered to be equal to the total count, and 8 records will be returned in the set.

getPageEndIndex()).getControl().out. The user sends a request XML for searchCustomer(My custom search transaction) transactions including the pagination parameters. Inside the controller class for our searchCustomer/handlesearchCustomer we have to add response BObj class name in the DWLControl You will be having a method generated in you controller like the one below.out.Add the following just above your List list = bObjQuery. Now you are done with the pagination implementation for you custom search.getPageStartIndex()).getName(). theBObj. Now come back to your component class: 3.getControl()).xxxResponseBObj"). (Please read about how to create a custom search in my previous post) 1. Pagiantion Pramaters: <pagestartindex>1 </pagestartindex> <pageendindex>3</pageendindex> <returnavailableresultcount>true </returnavailableresultcount> (Will help you return the total number of records available on executing the query for your search. bObjQuery.) 2. Add the following line of code in your component class after you got the bObjQuery.setMaxResults(int).setResponseBObjsForTxn(reponseBobsForTxn).println("End Index---"+theBObj.getControl(). reponseBobsForTxn. theBObj.getControl(). public DWLResponse searchCustomer(xxxRequestBObj theBObj) throws DWLBaseException Add the following: Vector reponseBobsForTxn=new Vector().println("Start Index--"+theBObj. System. theBObj.mycompany.getControl().Now we are ready to implement the pagination in our custom search transactions. System.setConsiderForPagintionFlag(considerForPagination). To add to this if you want to restrict the size of the result set returned by a search transaction. What I had done to configure the max result count is add a 'maxresults' tag to my custom request object so that the user can configure the max results returned.getResults(). .add("com. boolean considerForPagination = PaginationUtils.class.considerForPagintion(xxxResponseBObj.