How to Set Property Class in Oracle Forms?

Being an Oracle developer, in one way or the other we usually play develop objects or functionalities whose sole purpose is the re-usability. “Change once and reflect everywhere” is usually the mind-set of an expert programmer. Oracle Forms provides us the same kind of amazing feature called property class. Let us see how to set property class in Oracle Forms.

Before I start over, let us not confuse property palette with property class. They are two different features of Oracle Forms with somewhat similar characteristics.

When we right click on any object in Forms we see the option of property palette. Let me show you in the image below:

property palette

On this screen you can set properties of that respective item in the way you wish such as Prompt, Title, Visual Attribute, Hint, Comments etc. You can also set property class on this screen. But one point to keep in mind here is that these set of properties are specific to that item only.

Property class differs from property palette in the context that you can assign them to an object at the property Subclass Information in Property palette of that object.

Why to set property class?

In the starting paragraph I mentioned that a seasoned programmer will prefer “change once reflect everywhere” rule. Property class works on same kind of principle. Once you create a property class and set its properties, it can be used across all items in your form. Any change you make in property class will be immediately reflected in those items too.

Steps to Set Property Class In Oracle Forms

1) In Oracle Forms, open any existing form or create new one. Near the bottom side of your module you will see an option of property class. Click on green + symbol on the left side to create new object of property class.

property class

2) Rename the property class according to your standards. Now one by one add the properties you want to set for this property class by clicking on green + button. Choose any property from the list of values.

set property class

3) Once I choose all the properties my property class will look as below:

property class with all properties set

4) Attach this property class to the items of your form where you want same kind of effect. Property class can be set to Subclass information property of an item.

set property class in item

Difference between property class and visual attribute

  • Visual Attribute only sets the Color and Font property of an item. While property class sets any properties of an item.
  • You can assign property class to visual attribute but you cannot assign visual attribute to property class.
  • Properties of visual attributes will override the property of property class. So best practice is to either use visual attribute or property class for the same item.

Read here official documentation of property class by Oracle

Hope you like the article and feedback is highly appreciated.

You can also Subscribe here to stay updated on latest posts of OracleMine.com.

Leave a Reply

Your email address will not be published. Required fields are marked *