gpt4 book ai didi

java - 如何在adf中的iterator.excuteQuery()之后再次选择currentRow?

转载 作者:行者123 更新时间:2023-11-30 01:58:32 24 4
gpt4 key购买 nike

我有一个具有更新方法的 ADF 页面,更新后刷新表,所有这些业务都是在支持 bean 中完成的,下面是代码

OperationBinding operationBinding =  ADFUtil.getBindingContainer().getOperationBinding("manageRequestStatus"); // this is the update method

Object result = operationBinding.execute();

执行更新后,数据库中的值发生更改,因此我调用它来刷新 adf 表

DCIteratorBinding searchIterator = ADFUtil.findIterator("myIterator");
searchIterator.executeQuery();

此方法刷新数据表,并且表会刷新为新数据

问题是:执行查询后,选择了表的第一行

我想要做的是:刷新后,选择同一行

这是我的尝试:

RowSetIterator rsi = searchIterator.getRowSetIterator();
Row currentRow = rsi.getCurrentRow();
Key k =currentRow.getKey();
searchIterator.executeQuery();
rsi.setCurrentRow(currentRow) ;

最佳答案

我已经通过以下方法解决了这个问题

Int index =searchIterator.getCurrentRowIndexInRange();
searchIterator.executeQuery();
searchIterator.setCurrentRowIndexInRange(index);

关于java - 如何在adf中的iterator.excuteQuery()之后再次选择currentRow?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53633992/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com