- Refreshing the parent view when an in-line popup taskflow returns.
This scenario usually arises when the second task flow updates tables used by the first one from a different transaction context.
There are two taskflows, both work with separate transaction contexts(Transaction attribute is set as new-transaction). Second taskflow is invoked from the first one as a dialog. The requirement here is to refresh the 'executables' of calling page(from first taskflow) when the second taskflow returns.
createWO view from first task flow.
truckCompTF is the second taskflow.
- Define a returnListener for secondary window on the command button (which invokes second taskflow as dialog)
- Create method as dialogReturnListener in returnListner and copy below code
public void dialogReturnListener(ReturnEvent returnEvent) {
BindingContext bc = BindingContext.getCurrent();
DCBindingContainer dcb =
(DCBindingContainer)bc.getCurrentBindingsEntry();
DCIteratorBinding iter =
dcb.findIteratorBinding("TransportUnitVOIterator"); //your VOIterator
iter.executeQuery(); // It refresh the underlying IteratorBindings used by the parent page.
RequestContext.getCurrentInstance().addPartialTarget(returnEvent.getComponent().getParent().getParent());
}






