This is part one of a multi-part series exploring some quirks in using Component Interfaces with Application Engine programs. If nothing else, hopefully, these will give new developers some insight into how to use a Component Interface. My goal is to expose a bug in the Application Engine tool that maybe Oracle will see and fix.
This first part will simply walk you through creating a Component Interface. This part is just a map to associate the fields on the screen (or really in the component’s buffer) with an API property that can be accessed with code.
First, we create a new definition in Application Designer. You can either use the Ctrl + N keyboard shortcut or the File > New menu. Choose Component Interface from the list:
Next, have no fear — you will see the open dialog making it look like you want to open a component. Really, Application Designer is just asking you which component you want to map. In this example, we will use the “PERSONAL_DATA” component, which is the Modify a Person screen (Workforce Administration > Personal Information > Modify a Person):
Next, Application Designer asks you if you want to default the properties. I almost always say yes to this questions because it will make Application Designer do all the work for you in generating the map. The properties will be given names based on their field names in the buffer:
Now, you should have a new component interface generated for you. Notice that the left side is the Component Structure. It is the same as the Structure tab on the Component itself. The right side is the map of record/field to property name. In this screenshot, I have the component open in the background and I drew a line to show how the structure is the same. Then, I drew a line from the structure to the property generated for one of the fields:
Finally, save the component interface. You can either use the Ctrl + S keyboard shortcut, or you can use the File > Save menu. I gave it the name BLG_PERS_DTA_CI.
While your at it, you may also want to add it to the project. You can use the F7 keyboard shortcut or the Insert > Current Definition Into Project menu.
This concludes creating the Component Interface. Please stay tuned for the next steps …