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:
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.
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.
3) Once I choose all the properties my property class will look as below:
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.
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.
Hope you like the article and feedback is highly appreciated.
Hi I am Paras.
Thanks for stopping by at OracleMine.com. Speaking about my brief introduction, I work for a multinational organisation in Oracle related technologies. Being an avid blogger, I would like to inform you about my productivity and motivational blog XpressPlanet.com. Speaking of OracleMine.com, I will try my best to share knowledge on technologies in as simple and understandable manner as possible. You can also contribute your knowledge on OracleMine by writing to us at email@example.com. Again I appreciate your visit. Hope to see you again and again!