Determining Current Block and Current Item in Oracle Forms
2016-12-25 21:21
696 查看
SYSTEM.CURSOR_BLOCK
[align=justify]Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system variable. The value that the SYSTEM.CURSOR_BLOCK system variable represents depends on the current[/align] [align=justify]navigation unit:If the current navigation unit is the block, record, or item (as in the Pre- and Post- Item, Record, and Block triggers), the value of SYSTEM.CURSOR_BLOCK is the name of the block where the cursor is located. The value is always a character string. If the current navigation unit is the form (as in the Pre- and Post-Form triggers), the value of SYSTEM.CURSOR_BLOCK is NULL.[/align] [align=left]
SYSTEM.CURSOR_BLOCK examples[/align]
[align=justify]Assume that you want to create a Key-NXTBLK trigger at the form level that navigates depending on what the current block is. The following trigger performs this function, using :SYSTEM.CURSOR_BLOCK stored in a local variable.[/align]
DECLARE
curblk VARCHAR2(30);
BEGIN
curblk := :System.Cursor_Block;
IF curblk = ’ORDERS’
THEN Go_Block(’ITEMS’);
ELSIF curblk = ’ITEMS’
THEN Go_Block(’CUSTOMERS’);
ELSIF curblk = ’CUSTOMERS’
THEN Go_Block(’ORDERS’);
END IF;
END;
SYSTEM.CURSOR_ITEM
[align=justify]Determining current item using System.Cursor_Item in Oracle Forms. SYSTEM.CURSOR_ITEM represents the name of the block and item, block.item, where the input focus (cursor) is located.The value is always a character string.[/align]Usage Notes
[align=justify]Within a given trigger, the value of SYSTEM.CURSOR_ITEM changes when navigation takes place. This differs from SYSTEM.TRIGGER_ITEM, which remains the same from the beginning to the end of single trigger.[/align]
SYSTEM.CURSOR_ITEM examples [align=left][/align] [align=left] Assume that you want to create a user-defined procedure that takes the value of the item where the cursor is located (represented by SYSTEM.CURSOR_VALUE), then multiplies the value by a constant, and then reads the modified value into the same item. The following user-defined procedure uses the COPY built-in to perform this function.[/align] [align=justify] [/align]PROCEDURE CALC_VALUE IS
new_value NUMBER;
BEGIN
new_value := TO_NUMBER(:System.Cursor_Value) * .06;
Copy(TO_CHAR(new_value), :System.Cursor_Item);
END;
View Oracle Developer Handbook at Amazon.com
相关文章推荐
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- Know How And When To Use System.Message_Level To Control Messages In Oracle Forms
- Highlighting Text Item On Entry In Oracle Forms
- Populating Display Item Value On Query In Oracle Forms
- Populating Tree Item With Record Group In Oracle Forms
- Create Data Block Based On From Clause Query In Oracle Forms
- Examples For When-Validate-Item trigger In Oracle Forms
- Writing Text File From A Tabular Block In Oracle Forms
- Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle Forms
- Using CLEAR_BLOCK To Prevent Save Confirmation Dialogs In Oracle Forms
- An Example Of Validating Text Item In Oracle Forms Using When-Validate-Item Trigger
- Set Font Properties On Mouse Hover Of Push Button And Text Items At Run time In Oracle Forms
- Populating Tabular Data Block Manually Using Cursor in Oracle Forms
- Using Single Alert For Messages And Confirmation Messages In Oracle Forms With Set_Alert_Button_Property
- Copy Records From One Data Block To Another Data Block In Oracle Forms
- Using SYSTEM.MOUSE_ITEM In Oracle Forms
- Adding List Item Element At Runtime In Oracle Forms
- Moving From Top To Bottom in Detailed Block in Oracle Forms