之前在WebDynpro丟一個類似html的alert出來可以這樣做

http://roach0426.pixnet.net/blog/post/19683958

 

但發現怎上新版NetWeaver後!原先的語法就不支援的..
經過研究後改成下列的方式

先在View建立一個Actions這邊取名sure裡面可以不用寫程式

          IWDAction sure = wdThis.wdGetSubmitAction();
 IWDConfirmationDialog dialog 
= this.wdComponentAPI.getWindowManager().
createConfirmationWindow(msgtxt,sure,"OK");

 dialog.setTitle("提示");
 dialog.show();

這樣就會出現一個訊息方塊上面只有一個按鈕點下去去呼叫sure就會結束目前視窗

假如要出現兩個按鈕!比方『是』或『否』

那就要在做一個Actions

   IWDAction sure = wdThis.wdGetSubmitAction();
 IWDAction cancel = wdThis.wdGetCancelAction();

 IWDConfirmationDialog dialog 
= this.wdComponentAPI.getWindowManager().
createConfirmationWindow(msgtxt,sure,"OK");

 dialog.addChoice(cancel , "取消");
 dialog.setTitle("提示");

 dialog.show();

然後在SubmitAction中去做相關的控制

arrow
arrow
    全站熱搜

    ROACH 發表在 痞客邦 留言(0) 人氣()