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. vim的常用操作

      vim的几种编辑模式 正常模式:可以使用快捷键命令,或按:输入命令行. 插入模式:可以输入文本,在正常模式下,按i.a.o等都可以进入插入模式. 可视模式:正常模式下按v可以进入可视模式, 在可视 ...

  2. getshell不用英文数字 或者不用下划线

    getshell不用英文字母和数字 上代码 实际代码没有echo strlen($code);我测试的时候加上去的 思路是eval执行getFlag函数. 过滤了字母和数字,长度得小于40 直接看pa ...

  3. Python-S9—Day85-ORM项目实战之forms组件以及Modelform补充、跨域请求及应用

    01 forms组件补充1 02 forms组件补充2 03 ModelForm回顾 04 浏览器的历史 05 jsonop实现跨域请求 06 jsonop实现跨域请求2 07 jsonop实现跨域请 ...

  4. python 中单例模式

    1.什么是单例模式: 单例模式是指一个类有且只有一个实例对象,创建一个实例对象后,再创建实例是返回上一次的对象引用.(简单的讲就是两个实例对象的ID相同,节省了内存空间) 2.单例模式的创建: 举例创 ...

  5. [oldboy-django][1初始django]web框架本质 + django框架 + ajax

    web框架本质 浏览器(socket客户端) - 发送请求(ip和端口,url http://www.baidu.com:80/index/) - GET 请求头(数据请求行的url上: Http1. ...

  6. bzoj3609【HEOI2014】人人尽说江南好

    题意:http://www.lydsy.com/JudgeOnline/problem.php?id=3609 sol :博弈论  通过打表找规律,发现答案是%m循环的,且当m为偶数时取反  因为我太 ...

  7. 1 - Django安装

    一.Python安装 在Mac系统下,系统自带python开发环境,打开终端,输入python,我们就可以看到当前python版本号,例如我的系统是OS X EI Caption 10.11.1,自带 ...

  8. 两个Vue Demo

    1 实现 person list <!DOCTYPE html> <html> <head> <meta charset="UTF-8"& ...

  9. H5 基本标签使用 浅析 (含video标签、input表单等)

    1. 音频标签<audio> <audio src = “./music/Alone.mp3” controls autoplay loop = “3” ></audio ...

  10. pom.xml(Project Object Model) 文件简单介绍

    <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mave ...