You can display modal windows in Oracle Forms to display normal messages, error message or asking for confirmation eg. on deleting a record or saving a record etc. using show_alert command.
 
These modal window messages can be shown using Alert option in Oracle forms.
 
This is the screen shot below for this example:
 
 
You can download this form from the following link: Modal_Msgt.fmb
For this example I have created three alerts with the following names:
 
1. Good_Msg
2. Error_Msg
3. Ask_Alert
 
The following code is written for "Show Good Message" button to display a normal message, you can use this code in any PLSQL block:
 
Declare
-- create a numeric variable to hold show_alert return value
nalertbutton number;
Begin
-- set the message for alert
set_alert_property('good_msg', alert_message_text, 'Records saved successfully.');
-- after below statement the execution will hold till you click on ok.. becuase it is an modal window
nalertbutton := show_alert('good_msg');
:alertblock.result := 'That was a good message.';
-- after this you can perform any task...
End;
 
The following code is written for "Show Error Message" button to display an Error message:
 
Declare
-- create a numeric variable to hold show_alert return value
nalertbutton number;
Begin
-- set the message for alert
set_alert_property('error_msg', alert_message_text, 'An error occurred.');
-- after below statement the execution will hold till you click on ok.. becuase it is an modal window
nalertbutton := show_alert('error_msg');
:alertblock.result := 'That was an ERROR message.';
-- after this you can perform any task...
End;

The following code is written for "Ask Confirmation" button to ask for a confirmation:
 
Declare
-- create a numeric variable to hold show_alert return value
nalertbutton number;
Begin
-- set the message for alert
set_alert_property('ask_alert', alert_message_text, 'Confirm Yes or No?');
-- after below statement the execution will hold till you click on ok.. becuase it is an modal window
nalertbutton := show_alert('ask_alert');
-- now check which button or answer have been choosen
if nalertbutton = alert_button1 then
:alertblock.result := 'You choose Yes.';
else
:alertblock.result := 'You choose No.';
end if;
-- after this you can perform any task...
End;

Subscribe To Get Email Notifications For Latest Updates Like This:
Enter your email address:

Delivered by FeedBurner
See also http://www.foxinfotech.in/2015/02/using-single-alert-for-messages-and-confirmation-messages.html

Displaying Modal Window Messages in Oracle Forms Using Show_Alert的更多相关文章

  1. Using Single Alert For Messages And Confirmation Messages In Oracle Forms With Set_Alert_Button_Property

    Learn how to use single Oracle Form's Alert object for warning/information messages and confirmation ...

  2. Know How And When To Use System.Message_Level To Control Messages In Oracle Forms

    SYSTEM.MESSAGE_LEVEL is used to control the messages that end users see when they use the Oracle For ...

  3. Using Find_Alert and Show_Alert in Oracle Forms

    Show_alert is used to display model window messages in Oracle Forms and Find_alert searches the list ...

  4. Displaying Window In Center In Oracle Forms 6i

    Center window automatically  in Oracle Forms 6i, use the following procedure by passing window name ...

  5. Using Pre-Form Trigger In Oracle Forms

    Pre-Form trigger in Oracle Forms fires during the form start-up, before forms navigates to the first ...

  6. Create Custom Modal Dialog Windows For User Input In Oracle Forms

    An example is given below to how to create a modal dialog window in Oracle Forms for asking user inp ...

  7. An Example of On-Error Trigger in Oracle Forms

    I wrote this trigger around 4 years ago to handle errors in an application based on Oracle Forms 6i. ...

  8. Some Useful Property Settings Explained Of Oracle Forms

    In Oracle forms when we have two or more blocks and there is a requirement to join them or make a re ...

  9. Know How To Use ID_NULL Function To Search An Object In Oracle Forms

    ID_NULL built in function is used to determine that an object type variable is null or not null in O ...

随机推荐

  1. PHP 命名空间和自动加载

    PHP 命名空间 php5.3 之后引入了命名空间的特性,从本质上讲,命名空间就是一个容器,你可以将类.函数和变量放在其中,在命名空间中,你可以无条件地访问这些项,在命名空间之外,必须导入或引用命名空 ...

  2. c++ primer plus 第6版 部分一 1-4章

    c++ primer plus 第6版 源代码 ---编译器---目标代码---连接程序(启动代码--库代码)---可执行代码 源代码扩展名:c   cc   cxx     C    cpp     ...

  3. hdu 4176

    Class Statistics Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  4. 【转】ugui自制摇杆

    http://www.cnblogs.com/duyushuang/p/4457691.html 珍爱生命,远离插件. 以上8个字,好好理解. 反正我是这么觉得. 我说的是unity,不是魔兽世界. ...

  5. HDU 5322 Hope ——NTT 分治 递推

    发现可以推出递推式.(并不会) 然后化简一下,稍有常识的人都能看出这是一个NTT+分治的情况. 然而还有更巧妙的方法,直接化简一下递推就可以了. 太过巧妙,此处不表,建议大家找到那篇博客. 自行抄写 ...

  6. docker 集群 kubernetes 1.8 构建

    1.环境说明:操作系统:CentOS7Kubernetes 版本:v1.8.3Docker 版本:v17.06-ce master  192.168.10.220  etcd  kube-apiser ...

  7. py2exe error: [Errno 2] No such file or directory: 'MSVCP90.dll'

    使用 python setup.py py2exe 打包时出现 py2exe error: [Errno 2] No such file or directory: 'MSVCP90.dll' 解决方 ...

  8. JavaScript (JS)基础:ECMAScript 浅析 (含Math基本方法解析)

    浏览器端JavaScript的组成 ECMAScript:语法规范 DOM:Document Object Model  文档对象模型,操作页面元素 BOM:Browser Object Model  ...

  9. response contentType

    response.setContentType(MIME)的作用是使客户端浏览器,区分不同种类的数据,并根据不同的MIME调用浏览器内不同的程序嵌入模块来处理相应的数据. 例如web浏览器就是通过MI ...

  10. BZOJ 3910: 火车

    3910: 火车 Time Limit: 20 Sec  Memory Limit: 512 MBSubmit: 358  Solved: 130[Submit][Status][Discuss] D ...