简体   繁体   English

Guidewire:如何在guidewire 6.0版中实现分页

[英]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? 我正在使用guidewire应用程序6.0版。如何在应用服务器中分页一个非常大的数据集?

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. 当前,PCF会将索赔中预设的所有付款返回到屏幕,并且通过指定pagesize = 3将在用户界面中显示的结果编号减少为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 " 配置行迭代器时 ,有一个名为“ pageSize ”的参数

  • when you set 0: paging is disabled 设置为0时:分页被禁用
  • when you set a number different than 0 - that will be the number of elements in a single page 当您设置一个不同于0的数字时-这将是单个页面中的元素数

if you mean pagination on UI @SebastianJ answer is correct, if you are tlaking about query level you need something like this: 如果您是说UI @SebastianJ答案上的分页是正确的,如果您对查询级别有所怀疑,则需要这样的内容:

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() //
...
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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