博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
FORM开发相关技术(二)
阅读量:5086 次
发布时间:2019-06-13

本文共 5000 字,大约阅读时间需要 16 分钟。

1.取得需对应的货币

其中:GET_ITEM_PROPERTY('LINES.PRICE',MAX_LENGTH)为返回一个该item的最大长度,
FND_CURRENCY.GET_FORMAT_MASK(currency_code IN varchar2,field_length IN number)return varchar2;
2.格式化(需要的话进行汇率转换)item的货币类型
APP_ITEM_PROPERTY.SET_PROPERTY('LINES.PRICE',FORMAT_MASK,
FND_CURRENCY.GET_FORMAT_MASK(:ORDERS.CURRENCY_CODE,
GET_ITEM_PROPERTY('LINES.PRICE',MAX_LENGTH) ))
3.动态控制item的显示格式的触发范围
在Block-level的Post-query trigger和Item-level的 when-validate-item trigger调用handler,控制显示格式。
CALENDAR 日历
如何实现在form中弹出calendar并返回所选日期的功能?
1.设text item为日期型, LOV属性为:ENABLE_LIST_LAMP并且Validate from List LOV—>No
2.在该text item 的KE_LISTVAL下加入如下代码:calendar.show;
trigger属性Execution Hierarchy—>Override,fire in enter-query mode—>No。
使用APP_DATE.FND_DATE取得服务器端的时间环境
4 . Dependencies item的编程
语法:1.APP_FIELD.SET_DEPENDENT_FIELD(EVENT,:block.master_item = CONDITION,
‘block.dependent_item’);
用途:A conditionally-dependent item changes validation when the value in the master
item changes. Specify the condition rather than the master item name.
This procedure makes an item enterable or not enterable based on whether the master item
is NULL or a specified condition is TRUE, and clears the field. The dependent item can be
a text item, check box, or poplist.
You typically call this procedure in the following triggers:
? WHEN–VALIDATE–ITEM on the master field
? WHEN–VALIDATE–ITEM on the field(s) the condition is based on or in event INIT
on the dependent field
? PRE–RECORD
? POST–QUERY (required only when the dependent item is in a
multi–record block)
:block.master_item = CONDITION包括:
--APP_FIELD.SET_DEPENDENT_FIELD(EVENT,(:block.master_item IS NOT NULL),
’block.dependent_item’);用于Multiple items may depend on a single master.
--APP_FIELD.SET_DEPENDENT_FIELD(EVENT,((:block.master_item1 IS NOT NULL) AND
(:block.master_item2 IS NOT NULL)),’block.dependent_item’);
用于Two master items may share a dependent item.
--APP_FIELD.SET_DEPENDENT_FIELD(EVENT,’block.master_item,’block.dependent_item’);
用于Cascading dependence - an item can be both master and dependent.
5.APP_FIELD.SET_EXCLUSIVE_FIELD
用途Mutually exclusive items—they look like two items, but behave as one. Use
APP_FIELD.SET_EXCLUSIVE_FIELD to code.
--APP_FIELD.SET_EXCLUSIVE_FIELD(EVENT,’block.item1’,’block.item2’,’block.item3’);
Call item handler procedures in:
– WHEN-VALIDATE-ITEM for each exclusive item
– PRE-RECORD on the items’ block (Fire in Enter-Query Mode: No)
– WHEN-CREATE-RECORD on the items’ block
6.APP_FIELD.SET_INCLUSIVE_FIELD
用途Mutually Inclusive Items—one for all and all for one!
Use APP_FIELD.SET_INCLUSIVE_FIELD to code a set of items where, if any
of the items is not null, all items are required.
--APP_FIELD.SET_INCLUSIVE_FIELD(EVENT,’block.item1’,’block.item2’);
? Call item handler procedures in:
– WHEN-VALIDATE-ITEM for each inclusive item
– PRE-RECORD on the items’ block (Fire in Enter-Query Mode: No)
7.APP_FIELD.SET_REQUIRED_FIELD
用途:Conditionally Mandatory items—use APP_FIELD.SET_REQUIRED_FIELD to
require certain items only if a certain condition is met.
--APP_FIELD.SET_REQUIRED_FIELD(EVENT,(CONDITION),’block.item’);
通常在以下的trigger中调用Dependencies控制逻辑:PRE-RECORD,when-create-record,
when-validate-item,when-checkbox-changed, when-radio-changed,when-list-changed
和‘INIT’事件。PRE-RECORD和INIT是在操作数据前初始化这些逻辑,而其他是在item发生变化后验证这些逻辑,满足条件则进行后续的动作。
使用APP_ITEM_PROPERTY.SET_PROPERTY代替SET_ITEM_PROPERTY设置item属性APP_ITEM_PROPERTY.SET_PROPERTY modifies the following properties:
? DISPLAYED
? ENABLED
? ENTERABLE
? ALTERABLE (item instance level)
? ALTERABLE_PLUS (item level)
? REQUIRED
注意:在APP_ITEM_PROPERTY.SET_PROPERTY使用 item id 或者 block.item_name
语法:
item_id := Find_item(’block_name.item_name’);
app_item_property.set_property(item_id,property_name,setting);
等同于 app_item_property.set_property(’block_name.item_name’,property_name,setting);
8. Tab Related Code
Tab-related Variables 与Tab-related相关的变量
? :SYSTEM.TAB_NEW_PAGE
– name of the tab page the user clicked on(取得用户点击后的tab 页)
? :SYSTEM.EVENT_CANVAS
– name of canvas that owns the newly-selected tab page(取得用户新点击的画布)
? :SYSTEM.TAB_PREVIOUS_PAGE
– name of the tab page that was topmost before the user
clicked on the new one(取得在用户点击新的页面前的tab页)
Dynamically Changing Tabs
? Dynamically hide tabs only at form startup.
– set_tab_page_property(...VISIBLE)
? Dynamically enabling/disabling tabs.
– set_tab_page_property(...ENABLED...)
Tab-related Trigger
? WHEN-TAB-PAGE-CHANGED
– fires only when user clicks on a tab
– cannot be fired programmatically
– can only exist at the form level
target_canvas_name VARCHAR2(30) := :system.tab_new_page;--取得当前用户点击的tab页
curr_canvas_name VARCHAR2(30) := get_item_property(:system.cursor_item,item_canvas);--返回当前画布的名称
current_tab VARCHAR2(30) := get_canvas_property('TAB_LINES_REGIONS',topmost_tab_page);
--返回在tab画布上的顶层的tab页的名字
set_canvas_property('TAB_LINES_REGIONS', topmost_tab_page, curr_canvas_name); --将当前的画布设为可交换页顶层的tab
9.Window 与Region Behavior 编程:
WINDOW的控制:(使用app_window 包来取得标准的窗口控制动作)

转载于:https://www.cnblogs.com/quanweiru/archive/2012/07/31/2616118.html

你可能感兴趣的文章
TCP粘包问题及解决方案
查看>>
构建之法阅读笔记02
查看>>
添加按钮
查看>>
移动端页面开发适配 rem布局原理
查看>>
Ajax中文乱码问题解决方法(服务器端用servlet)
查看>>
会计电算化常考题目一
查看>>
阿里云服务器CentOS6.9安装Mysql
查看>>
剑指offer系列6:数值的整数次方
查看>>
js 过滤敏感词
查看>>
poj2752 Seek the Name, Seek the Fame
查看>>
软件开发和软件测试,我该如何选择?(蜗牛学院)
查看>>
基本封装方法
查看>>
bcb ole拖拽功能的实现
查看>>
生活大爆炸之何为光速
查看>>
bzoj 2456: mode【瞎搞】
查看>>
[Typescript] Specify Exact Values with TypeScript’s Literal Types
查看>>
[GraphQL] Reuse Query Fields with GraphQL Fragments
查看>>
Illustrated C#学习笔记(一)
查看>>
理解oracle中连接和会话
查看>>
两种最常用的Sticky footer布局方式
查看>>