开发者

How do I gain Control of a row in Tabular Layout in Oracle

This might be simple but I am new to Oracle. I a开发者_如何学运维m using Oracle 10g and have a form that lists our information from a linked table in a tabular Layout. The last column of data is a "list Item" item type that has the Element list of Enabled (T) and Disabled (F).

What I need is when a user changes this dropdown, to disabled, I want ONLY that row to have some of the columns be disabled and not the entire column.

This is also assuming on load of the form, it will disable and enable rows of data depending on what values are being pulled from the EnabledDisabled column in the database.

Thanks for the help!


Option 1: use the ENABLED item property.

Unfortunately Oracle Forms does not allow changing the ENABLED property of an item at the item instance level.

What you can do, however, is enable or disable the whole item when the user enters a record - use the WHEN-NEW-RECORD-INSTANCE trigger - depending on the value of the current record's value for the list item, the trigger would set the ENABLED property to PROPERTY_TRUE or PROPERTY_FALSE.

Of course, your list item would also have the same code in its WHEN-LIST-CHANGED trigger.

The downside to this approach is that the whole column will "look" disabled to the user, and they will not be able to select a different record using those disabled items.

Option 2: use the INSERT_ALLOWED and UPDATE_ALLOWED properties.

You can set these properties at the item instance level using SET_ITEM_INSTANCE_PROPERTY. You would set them in the block's POST-QUERY trigger, as well as in the list item's WHEN-LIST-CHANGED trigger.

This would not, however, change how the items look on the screen. To solve this, you could also set a visual attribute at the item instance level (e.g. change the items to use a dark gray background or something).

More comments.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜