Search code examples
oracle11goracle-adfjava-6

How do I update a RichTable from a ViewObject after I've applied the filter I want in code?


The user can upload a file of data that I would then use to perform a query on the view object. I did a simple test with one record:

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);

Now that I have the rows I want, how would I go about updating the RichTable with this data? I've been searching here, Google, and Github, but I'm having a hard time figuring out how to update the table.


Solution

  • I was able to solve this by just setting the WHERE clause on the view object directly and calling execute query. That refreshed the data in the table automatically.

    implVO.setWhereClause("QUOTE_SO_LINE_ID = 476120582");
    implVO.executeQuery();