I'm forced to use Oracle Form Builder 10.1.2.3.0. An ideal control I can use in the form for a particular item is a List Item
using a List Style
called Combo Box
.
Using this control, I can use set_item_property
in a PRE-FORM
trigger to set the background color of the list items to match the Canvas color.
The default background color of the items is white but that's not the biggest part of the problem. What is a pretty big UI problem is the color of the items after a selection is made: a horrible mustard color. I prefer something more Spartan and certainly something other than screaming "Hey! Look at me!".
When I run the form, everything is good until I choose an item in the list. Afterwards, the background of the selected item is mustard. And each popup of the list shows the items with a mustard background.
I figured I could add triggers to the Item to reset the background color but that didn't work. I created the following triggers to no avail:
. WHEN-LIST-CHANGED
. POST-CHANGE
. WHEN-VALIDATE-ITEM
. WHEN-NEW-ITEM-INSTANCE
I couldn't find any other trigger names that might be useful.
Is there hope for the code to force my UI preferences?
Before any action upon the control:
During the first popup:
After selecting an item during the first popup:
Second popup:
CodePudding user response:
If you are using Oracle E-Business Suite they likely have that functionality coded in the template form, which I would guess and say you are likely using.
If you are not using EBS, then you likely have code in your form making this change. For example, if you have a WHEN-LIST-CHANGED trigger that includes a line of code that looks something like this you will get the behavior you are describing:
SET_ITEM_PROPERTY ('LIST1', BACKGROUND_COLOR, 'OLAF1');
CodePudding user response:
If the Data Block
containing the item is not a database item, then you can alter that block so that it is not updateable. If you do that, then the mustard color won't be used.
It seems the purpose of the change in color (to mustard) is a visual clue that changes to the database have not been committed. But if the Data Block
is not a database block, then there's no need for the visual clue because no changes would be possible.
I changed DML Data Target Type
from Table
to None
and the mustard color no longer appears.
The other settings which I didn't change but which might also be relevant are:
Database Data Block = No
Query Data Source Type = None
Insert Allowed = No
Update Allowed = No
Locking Mode = Delayed
Delete Allowed = No
Update Changed Columns Only = No