question: public static Map < String , Object > performFindList ( DispatchContext dctx , Map < String , Object > context ) { Integer viewSize = ( Integer ) context . get ( "viewSize" ) ; if ( viewSize == null ) viewSize = Integer . valueOf ( 20 ) ; context . put ( "viewSize" , viewSize ) ; Integer viewIndex = ( Integer ) context . get ( "viewIndex" ) ; if ( viewIndex == null ) viewIndex = Integer . valueOf ( 0 ) ; context . put ( "viewIndex" , viewIndex ) ; Map < String , Object > result = performFind ( dctx , context ) ; int start = viewIndex . intValue ( ) * viewSize . intValue ( ) ; List < GenericValue > list = null ; Integer listSize = 0 ; try { EntityListIterator it = ( EntityListIterator ) result . get ( "listIt" ) ; list = it . getPartialList ( start + 1 , viewSize ) ; listSize = it . getResultsSizeAfterPartialList ( ) ; it . close ( ) ; } catch ( Exception e ) { Debug . logInfo ( "Problem getting partial list" + e , module ) ; } result . put ( "listSize" , listSize ) ; result . put ( "list" , list ) ; result . remove ( "listIt" ) ; return result ; }
target:  same as performFind but now returning a list instead of an iterator Extra parameters viewIndex: startPage of the partial list (0 = first page) viewSize: the length of the page (number of records) Extra output parameter: listSize: size of the totallist list : the list itself.