Oracle form 代码控制控件属性函数大全

需求:实现tab页的实时隐藏和显示

实现:SET_TAB_PAGE_PROPERTY('MAIN_TAB.RETS_PAGE',VISIBLE,property_off);/SET_TAB_PAGE_PROPERTY('MAIN_TAB.RETS_PAGE',VISIBLE,property_on);

以下为转载内容,Oracle提供了各种代码设置属性的函数,参数可以到form builder的联机帮助里面查找,原博客地址:http://blog.csdn.net/pan_tian/article/details/8434666

Build-In List

·  SET_APPLICATION_PROPERTY
·  SET_BLOCK_PROPERTY
·  SET_CANVAS_PROPERTY
·  SET_FORM_PROPERTY
·  SET_ITEM_PROPERTY
·  SET_ITEM_INSTANCE_PROPERTY
·  SET_LOV_PROPERTY
·  SET_MENU_ITEM_PROPERTY
·  SET_PARAMETER_ATTR
·  SET_RADIO_BUTTON_PROPERTY
·  SET_RECORD_PROPERTY
·  SET_RELATION_PROPERTY
·  SET_REPORT_OBJECT_PROPERTY
·  SET_TAB_PAGE_PROPERTY
·  SET_VIEW_PROPERTY
·  SET_WINDOW_PROPERTY


Example

set_item_property

begin
  if :<block_name>.<chk_name>='Y' then 
    set_item_property('<block_name>.<list_item_name>',VISIBLE/UPDATEABLE,PROPERTY_TRUE);
  else
    set_item_property('<block_name>.<list_item_name>',VISIBLE/UPDATEABLE,PROPERTY_FALSE);
  end if;
end; 

or

app_item_property.set_property ('<block_name>.<list_item_name>', enabled/enterable, property_on);


set_block_property

set_block_property ('<block_name>', query_allowed/update_allowed/delete_allowed, property_true);


SET_LOV_PROPERTY

SET_LOV_PROPERTY('inv_serial_lov', GROUP_NAME, 'inv_serial18');


Set_Record_Property

/*
** Built-in: SET_RECORD_PROPERTY
** Example: Mark the third record in the EMP block as if it
** were a queried record.
*/
BEGIN
Set_Record_Property( 3, ’EMP’, STATUS, QUERY_STATUS);
END;


-----------------------------------------------------------------------------------------------------------------------

Difference Between Set_Item_Instance_Property and Set_Item_Property
SET_ITEM_PROPERTY:Block中的所有Records
SET_ITEM_INSTANCE_PROPERTY:对当前Record起作用

If you want to turn fields 'on' and 'off' depending on information in a row then use 'set_item_instance_property(enterable)' in the Post_Query trigger on the block

IF :BLK_DISPLAY.METER_TYPE_ID = 'H' THEN
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.MILES',CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA_DISPLAY_ONLY');
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.MILES',CURRENT_RECORD,NAVIGABLE,PROPERTY_FALSE);
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.MILES',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_FALSE);
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.HOURS',CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA_UPDATE');
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.HOURS',CURRENT_RECORD,NAVIGABLE,PROPERTY_TRUE);
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.HOURS',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_TRUE);
ELSIF :BLK_DISPLAY.METER_TYPE_ID = 'M' THEN
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.MILES',CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA_UPDATE');
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.MILES',CURRENT_RECORD,NAVIGABLE,PROPERTY_TRUE);
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.MILES',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_TRUE);
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.HOURS',CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA_DISPLAY_ONLY');
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.HOURS',CURRENT_RECORD,NAVIGABLE,PROPERTY_FALSE);
  SET_ITEM_INSTANCE_PROPERTY('BLK_DISPLAY.HOURS',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_FALSE);
END IF;


Reference:

Oracle Forms Developer Form Builder Reference, Volume 1 - Release 6i : http://docs.oracle.com/pdf/A73074_01.pdf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值