GWT-EXT中的confirm框的点击确定“是/否”的监听

代码如下: 

  1. MessageBox.confirm("Confirm""Are you sure you want to do that?",   
  2.                             new MessageBox.ConfirmCallback() {   
  3.                                 public void execute(String btnID) {     
  4.                                     if(btnID.equals("yes")){
  5.                                         /*确定的操作*/
  6.                                                 /*要执行的代码*/
  7.                                     }
  8.                                         if(btnID.equals("no")){
  9.                                         /*否定的操作*/
  10.                                                /*要执行的代码*/
  11.                                     }
  12.                                 }   
  13.                             }); 

 

这样就能通过是、否来执行不同的操作

你可能感兴趣的:(GWT-EXT中的confirm框的点击确定“是/否”的监听)