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. 免费生成https证书以及配置

    http升级到https需要在nginx的配置中加入证书信息,查询资料后确定生成证书两种方案   第一种:自签名证书,然后开启 CloudFlare 的 CDN 服务   //确定是否安装openss ...

  2. IOS笔记051-手势使用

    UIGestureRecognizer 利用UIGestureRecognizer,能轻松识别用户在某个view上面做的一些常见手势 UIGestureRecognizer是一个抽象类,定义了所有手势 ...

  3. day02_03.五个数字一行输出

    第3题 5个数字一行输出 每当你做一道题目时,记住要明确你的目的是什么 你的代码执行出来会是一个什么效果 然后根据你想要的这个效果去编辑代码 题目:输出1~100(不包含100)之间的偶数,5个数字一 ...

  4. Python设计模式之一(单例模式)

    单例模式就是告诉你,只有一个对象 (1)单例模式不适用的场景 #单例模式就是告诉你,其实只有一个对象 class Person: def __init__(self,name,age): self.n ...

  5. maven学习(十三)——eclipse整合maven插件

    一.安装Maven插件 下载下来的maven插件如下图所示:,插件存放的路径是:E:/MavenProject/Maven2EclipsePlugin

  6. maven学习(八)——使用maven创建javaweb项目

    构建JavaWeb项目 1.创建JavaWeb项目 1.使用mvn archetype:generate命令,如下所示: mvn archetype:generate -DgroupId=com.my ...

  7. C#中静态变量和 静态方法的作用

    1.静态变量 在C#程序中,没有全局变量的概念,这意味着所有的成员变量只有该类的实例才能操作这些数据,这起到了“信息隐藏”的作用.但有些时候,这样做却不是个明智的选择. 假设我们要定义一个图书类,要求 ...

  8. sql cte的使用

    cte是可以连续使用的,多个cte用逗号隔开,但是只能有一个with 百度文章标题:Sql server中使用with as 提高性能+高效分页

  9. poj3009 Curling 2.0 (DFS按直线算步骤)

    Curling 2.0 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14563   Accepted: 6080 Desc ...

  10. RS232与TTL

    TTL电平,RS232电平和CMOS电平 不同点:TTL232的0是用0v表示,1是用5V表示.RS232的0是用+3V--+15V表示,1是用-3V---15V表示. 接口一般都用三根线:1:地线: ...