ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [原][Code Sample]Alert "Do you want to save the changes you have made?"

[原][Code Sample]Alert "Do you want to save the changes you have made?"

原创 Linux操作系统 作者:pan_tian 时间:2012-04-20 13:07:16 0 删除 编辑
1: When exiting form, Check the form. status.
2: If the status is changed, then display the customized alert.

in a KEY-EXIT trigger at form. level, enter the following code:
declare
button_val number;
begin
-- Perform. validation at item level to update :SYSTEM.FORM_STATUS.
validate(ITEM_SCOPE);
-- Check the record status
if(:SYSTEM.FORM_STATUS = 'CHANGED') then
    button_val := show_alert('ask_commit');
    if button_val = ALERT_BUTTON1 then
        -- If user chooses to commit changes...
        commit_form;
        exit_form;
    elsif button_val = ALERT_BUTTON2 then
        -- Do nothing if user cancels...
        null;
    elsif button_val = ALERT_BUTTON3 then
        -- Exit without committing...     
        Exit_form(No_commit);
    end if;
else
-- There have been no changes, just exit...
exit_form;
end if;
end;



作者:pan_tian 发表于2012-4-10 13:32:19 原文链接
阅读:12 评论:0 查看评论


Link URL: http://blog.csdn.net/pan_tian/article/details/7444991

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-721784/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: [原]EBS File Types
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2012-02-18

  • 博文量
    717
  • 访问量
    2503569