1) cretae a commit button actionlistener with the following backing bean clearForm
package bean2;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import oracle.adf.model.BindingContext;
import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;
import oracle.jbo.uicli.binding.JUCtrlAttrsBinding;
public class bean2 {
public bean2() {
super();
}
private BindingContainer bindings;
public void clearForm(ActionEvent actionEvent) {
// Add event code here...
BindingContainer bindings = getBindings();
OperationBinding commit;
commit = bindings.getOperationBinding("Commit"); // for master view object
OperationBinding createInsert;
createInsert= bindings.getOperationBinding("CreateInsert"); // for master view object
if(commit != null) commit.execute();
if(createInsert != null) createInsert.execute();
}
public BindingContainer getBindings() {
return (BindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
}
public void setBindings(BindingContainer bindings) {
this.bindings = bindings;
}
}
No comments:
Post a Comment