Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Button action listener not working on first click

Amaan JunaidMay 16 2013 — edited May 19 2013
Hi,

I have made a reset listenter on a button on a form. So the main problem is that the actionlistener of the button works but not on the first click. It works on the second click. The control in being sent to the event listener when i click the button. I have inserted print statements in the action listener, they are being printed on first click . But the total works well on the second click of the button. I am submiting the code of action listener.

public void RDreset(ActionEvent actionEvent) {
AdfFacesContext fctx = AdfFacesContext.getCurrentInstance();
resetValueInputItems(fctx, searchForm);
AdfFacesContext.getCurrentInstance().addPartialTarget(this.searchForm);
AdfFacesContext.getCurrentInstance().addPartialTarget(this.searchForm);
System.out.println("RESET ACTION : 2");
ActionEvent act = new ActionEvent(this.resetButton);
resetActionlist(act);
}



public void resetActionlist(ActionEvent actionEvent) {
AdfFacesContext fctx = AdfFacesContext.getCurrentInstance();
resetValueInputItems(fctx, searchForm);

System.out.println("VALUE SETTED : "+this.bindPurchaseOrderNum.getValue());
OperationBinding operationBinding3 = getBindings().getOperationBinding("ExecuteWithParams");
System.out.println("EXECUTED !");
operationBinding3.execute();

}


** "RDreset" is that actionListener that is being called on button click.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2013
Added on May 16 2013
8 comments
1,590 views