zoukankan      html  css  js  c++  java
  • Custom Libraty:Code Samples

    对于随后的所有编码的例子,假设下面是在该事件过程的顶部声明:

    1procedure event (event_name varchar2is
    2form_name varchar2(30) :=
    3name_in(‘system.current_form’);
    4block_name varchar2(30) :=
    5name_in(‘system.cursor_block’);
    6begin
    7
    8end;

    1.强制字段大写:

     1begin
     2if (event_name = ‘WHEN-NEW-FORM-INSTANCE’)
     3then
     4if (form_name = ‘APXVENDR’) then
     5app_item_property2.set_property(
     6‘VENDOR.NAME’,
     7CASE_RESTRICTION, UPPERCASE);
     8end if;
     9end if;
    10end;

    2.更改字段提示:

     1begin
     2if (event_name = ‘WHEN-NEW-FORM-INSTANCE’)
     3then
     4if (form_name = ‘APXVENDR’) then
     5app_item_property2.set_property(
     6'vendor.name', PROMPT_TEXT,
     7'Supplier Name');
     8end if;
     9end if;
    10end;

    3.更改按钮标签:

     1begin
     2if (event_name = ‘WHEN-NEW-FORM-INSTANCE’)
     3then
     4if (form_name = ‘APXVENDR’) then
     5app_item_property2.set_property(
     6'vendors.details', LABEL,
     7'More Details');
     8end if;
     9end if;
    10end;

    4.更改字段背景颜色:

    Code

    5.隐藏字段:

    Code

    6.设置不可更新和插入:

    Code

    7.添加菜单:

    1begin
    2if (event_name = ‘WHEN-NEW-FORM-INSTANCE’) then
    3if (form_name = ‘DEMXXEOR’) then
    4app_special2.instantiate(‘SPECIAL15’,
    5Print Order &Again’, ‘’, TRUE, ‘LINE’);
    6end if;
    7end if;
    8end;

    As with the APP_SPECIAL routines, APP_SPECIAL2 routines support up to
    45 entries spread among the Tools, Reports, and Actions menus, including
    check boxes on the Tools menu. See your Oracle Applications Developer’s
    Guide for more information.

    8.切换工具菜单项:

    Code

    9.为菜单添加逻辑:

    1begin
    2if (event_name = ‘SPECIAL15’) then
    3if (form_name = ‘DEMXXEOR’ and
    4block_name = ‘ORDERS’) then
    5/* Add your Print Order logic here */
    6raise FORM_TRIGGER_FAILURE;
    7end if;
    8end if;
    9end;

    10.要先测试函数or功能已定义:

    Code

    11.如何在EVENT事件中调用外部SP:

    Code

    实例1:

    Code

    实例2:

    ******

  • 相关阅读:
    专利申请流程
    安装Fedora16与Windows7共存双系统
    rpm检查依赖性
    C++中的static函数和extern关键字
    asp.net 浏览服务器文件
    如何用批处理文件写:获取当前日期的前一天
    有一个无效 SelectedValue,因为它不在项目列表中。
    .net 4.0 检测到有潜在危险的 Request.Form 值。
    ckeditor 在C#中使用
    使用任务计划程序自动执行任务
  • 原文地址:https://www.cnblogs.com/benio/p/1605556.html
Copyright © 2011-2022 走看看