Hi Folks,
I have a ADF table based on a db table. It also have a Checkbox - a transient attribute. When the button in invoked, the background method kicks of a stored procedure to process the selected (from CheckBox) assets. After this the ADF table should get refreshed from the underlying db table. When the button is pressed, it calls a managed bean. Code in it is below. The moveAssets is a methodAction defined as Bindings in PageDefinition. Even though I have executequery on the iterator, it does not refresh/ reflect the changes from the db table. Could you please suggest me where I am wrong?
public void MoveAssetsbtnMtd(ActionEvent actionEvent) {
// Add event code here...
BindingContext bctx = BindingContext.getCurrent();
DCBindingContainer con = (DCBindingContainer)bctx.getCurrentBindingsEntry();
// Note "moveAssets" is the Id of actionMethod binding in PageDefinition
OperationBinding oper = (OperationBinding) con.getOperationBinding("moveAssets");
//Since the method takes a parameter send the ToLocation to it assign it with ParamsMap
oper.getParamsMap().put("vToLoc", resolveExpression("#{bindings.HZLocations1.attributeValue}"));
//oper.getParamsMap().put("Param2Name", "Param2Value");
System.out.println("Moving asset to: "+resolveExpression("#{bindings.HZLocations1.attributeValue}"));
//Execute a method
oper.execute();
//Check for error after executing the method
if (oper.getErrors().size() > 0) {
//Handle any errors here
System.out.println("Error in MoveAssetsbtnBean");
}
// Refresh the ADF table from the equipment movement hist table
// after moving the selected assets ---- 20150429
DCBindingContainer binds =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter1 = binds.findIteratorBinding("AssetMove1Iterator");
iter1.executeQuery();
}
Thanks