Wednesday, May 29, 2013

ADF GUI : Call method when you click Ok on Dialog

I have seen many times developers just write code in listener without comparing what action was taken on user interface component.

In this case , I am talking about ADF Faces Dialog component. I am executing the logic only if  OK button is clicked.

 <af:dialog id="dialog1"                   
            dialogListener="#{Bean.method}"/>
public void method(DialogEvent event{
        // okCancel dialog
        if (event.getOutcome().equals(DialogEvent.Outcome.ok)){
            //Logic
        }
} 

No comments:

Post a Comment