当我在代码中应用了我想要的过滤器后,我如何从ViewObject中更新RichTable?

问题描述 投票:0回答:1

用户可以上传一个数据文件,然后我将使用该文件对视图对象进行查询。我用一条记录做了一个简单的测试。

BindingContext bindingctx = BindingContext.getCurrent();
BindingContainer binding = bindingctx.getCurrentBindingsEntry();
DCBindingContainer bindingsImpl = (DCBindingContainer)binding;
DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("XxqpCfQotOrdPrcTblVOIterator");
ViewObjectImpl implVO = (ViewObjectImpl)dciter.getViewObject();

RowQualifier rowQualifier = new RowQualifier(implVO);
rowQualifier.setWhereClause("QuoteSoLineId = 476120582");
Row[] filteredRows = implVO.getFilteredRows(rowQualifier);

现在我有了我想要的行,我如何用这些数据更新RichTable?我一直在这里、Google和Github上搜索,但我很难想出如何更新表。

oracle11g oracle-adf java-6
1个回答
1
投票

我可以通过直接在视图对象上设置WHERE子句并调用execute query来解决这个问题。这样就自动刷新了表中的数据。

implVO.setWhereClause("QUOTE_SO_LINE_ID = 476120582");
implVO.executeQuery();
© www.soinside.com 2019 - 2024. All rights reserved.