Preventing Validation of WHEN-VALIDATE-ITEM for Control Items During Query Time

This section presents a simple technique for preventing the WHEN-VALIDATE-ITEM trigger from firing while querying when such a trigger is defined for control items. This technique is useful when non-base items are part of a record and validation of these items is to be suppressed at the time of querying the records.

For a base table item, a WHEN-VALIDATE-ITEM will not fire during query mode. That's why you need a POST-QUERY trigger to populate any look-up items in the block that are based on the base table items.

For a control item, WHEN-VALIDATE-ITEM will fire when it is populated by means of a POST-QUERY. To prevent this, the following technique can be used:

WHEN-VALIDATE-ITEM



IF :SYSTEM.MODE != NORMAL THEN

 RETURN;

END IF;


Alternatively, you can force the item to be valid by setting the ITEM_IS_VALID property to TRUE in the POST_QUERY :

POST-QUERY



SET_ITEM_PROPERTY(item_id, ITEM_IS_VALID, PROPERTY_TRUE);

GUI Development

Advanced GUI Development: Developing Beyond GUI

Multi-form Applications

Advanced Forms Programming

Error-Message Handling

Object-oriented Methods in Forms

Intelligence in Forms

Additional Interesting Techniques

Working with Trees

Oracle 8 and 8i Features in Forms Developer



Oracle Developer Forms Techniques
Oracle Developer Forms Techniques
ISBN: 0672318466
EAN: 2147483647
Year: 2005
Pages: 115

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net