简体   繁体   中英

Guidewire : How to implement Pagination in guidewire version 6.0

I have been working in guidewire application version 6.0.How would you paginate an extremely large dataset in the app-server?

Example : Consider entity payment. Currently the PCF is bring back all the payments preset in the claim to the screen and the no of result to display in the UI reduced to 3 by specifying pagesize=3. Now I would like to implement the same concept through pagination in the database, via a chunking query in order increase the system stability.

List views : have a build-in row iterator which should even allow you to specify the number of rows displayed on each page.

When you configure your row iterator , there's a parameter called " pageSize "

  • when you set 0: paging is disabled
  • when you set a number different than 0 - that will be the number of elements in a single page

if you mean pagination on UI @SebastianJ answer is correct, if you are tlaking about query level you need something like this:

var partitionSize = 1000
var rows = Query.make(InvoiceItem).select()
var rowPartitions = com.google.common.collect.Iterables.partition(rows, 
partitionSize).iterator() //partitions invoice item ids
while(rowPartitions.hasNext()) {
var invoiceItems = rowPartitions.next().toTypedArray() //
...
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM