You can do something like:

            final Alert alert = new Alert(MessageType.QUESTION, "Are you 
sure?", new ArrayList("OK", "Cancel"));
            alert.open(getWindow(), new DialogCloseListener() {
                public void dialogClosed(Dialog dialog, boolean modal) {
                    System.out.println("User clicked " + 
alert.getSelectedOption());
                }
            });

-- Edvin

Fra: Adarsh Y.V [mailto:[email protected]]
Sendt: 22. september 2011 09:11
Til: [email protected]
Emne: taking feedback from alert dailog

Hi,

What is the approach to generate a alert dialogue with two buttons( OK , 
cancel) and get the feedback as to which button was pressed.

Thanks

Reply via email to