Dear All,
I am Beginner in ADF and am using Jdeveloper Studio Edition Version 12.2.1.0.0.
I am having a page which consists of Two taskflows.
First Task flow has a fragment which is having a table (non editable)
Second Task Flow contains an ADF Form
On the form I have added a Cancel/Rollback Button which has the following code
<af:button text="Undo" id="bCancel" actionListener="#{pageFlowScope.salespersonsForm.doCancel}"
icon="/icons/cancel.png" iconPosition="top"
partialTriggers="bCreate bCancelInsert bSaveInsert"
binding="#{pageFlowScope.salespersonsForm.buttonCancel}" immediate="true" />
public void doCancel(ActionEvent actionEvent) {
BindingContainer bindings = getBindings();
DCIteratorBinding iter = (DCIteratorBinding)bindings.get("SalespersonsUO1Iterator");
Key currentKey = iter.getCurrentRow().getKey();
OperationBinding operationBinding;
operationBinding = (OperationBinding) bindings.getOperationBinding("Rollback");
Object result = operationBinding.execute();
SalespersonsForm.refreshView();
iter.setCurrentRowWithKey(currentKey.toStringFormat(true));
}
private static void refreshView() {
FacesContext fctx;
fctx = FacesContext.getCurrentInstance();
String cv;
cv = fctx.getViewRoot().getViewId();
ViewHandler vh = fctx.getApplication().getViewHandler();
UIViewRoot ui = vh.createView(fctx, cv);
fctx.setViewRoot(ui);
}
The above is not helpful and there is no refresh of the data entered.
Also after clicking on this button Next and Previous buttons start working strangely.
Thanks & Regards
Arif Khadas