1.when-new-form-instance
在form加载时触发,经常会用于设置窗口初始位置
例如:
set_window_property('LIST',position,0,-18);
set_window_property('default',position,80,20);
导航到第一个数据块
例如: go_block('select');
2.when-tab-page-change
在使用标签画布时会用到这个触发器
例如:
declare
the_canvas varchar2(30) := :system.tab_new_page;
begin
if the_canvas = 'PAGE1' then
SHOW_VIEW('DETAIL_PAGE1');
elsif the_canvas = 'PAGE2' then
SHOW_VIEW('DETAIL_PAGE2');
elsif the_canvas = 'PAGE3' then
SHOW_VIEW('DETAIL_PAGE3');
end if;
end;
当使用tab类型的画布,切换tab的时候,需要显示不同放置在tab上的stack类型的canvas,使用when-tab-page-changed. 在trigger中需要使用:system.tab_new_page和:system.tab_previous_page两个系统变量进行判断.form级
3.when-new-record-instance
光标在行中移动时触发该触发器
4.when-create-record
插入一条新纪录时触发
5.pre-insert
基表数据块在插入数据前触发
6.pre-update
基表数据块在更新数据前触发
7.post-query
数据块在查询后触发
8.when-validate-record
当某条记录的焦点转移,需要进行验证,使用
9.pre-form
form刚启动,需要对一些全局变量(global)进行赋值或者其他处理
10. when-new-block-instance, block级
当光标定位到一个block上,想对这个block的某些item进行赋值或其他处理
11.when-new-item-instance
当焦点转移到某个item上时,需要对这个item进行赋值或者其他处理,
12.pre-record
当焦点转移到新的一条记录的时候,需要该记录进行处理
13.when-window-closed,
当点击关闭窗口的按钮时,需要关闭当前窗口或者做其他navigation的操作
14.post-form
退出form后,如果要清除一些全局变量的等事情,使用
15.key-exit
当form退出,需要进行保存,或者进行是否要保存的提示,那么需要使用key-exit, 在这个触发器中,可以通过使用exit_form(do_commit)来进行保存退出的功能, 可以通过使用exit_form(ask_commit)来进行是否保存的确认.
完待续……