Creating an item
Okay, in this recipe we are going to add an item to a screen. We can add an item to a screen without extending a page as long as the field exists in the view object of the region we are extending. A view object will nearly always contain many more data items than are visible on the screen. To find out the items that are in the view object, we need to do a little bit of investigation into the view object. Once we have checked the available items, we can personalize the page to make the items visible on the screen. We can also order the items in the region we are displaying them.
How to do it...
To add an item to a page, perform the following steps:
Log in to Oracle with
XXUSER
and select the XX Test Manager Self-Service responsibility.Navigate to Home | Personal Information.
Click on the Action icon for an employee record.
We are going to add a new item to the Basic Details region. This item will specify the employee original start date after the Full Name field.
However, before we add the item, we need to find out some information about the page as we need to know the view object that is used by the Basic Details region and the name of the attribute for the original start date item.
Scroll down to the bottom of the page and click on the About this Page link.
Then, click on the Expand All link.
Scroll down until you see the details for the Basic Details region.
We can see that the view object for this region is BasicDetailsCurrentVO.
Scroll down and expand the Business Component References Details section.
Click on oracle.apps.per.selfservice.personalinformation.server.BasicDetai lsCurrentVO for the basic details view object.
If we look at the attributes returned by the view object, we will notice that the original start date field is called OriginalDateOfHire:
Now that we have the information about the item we want to add, we can create the item through personalization:
Scroll to the bottom of the page and click on the Return to About Page link.
Scroll down to the bottom of the next page and click on the Return to Page: Personal Information link.
In the Personal Information page, click on the Personalize "Basic Details" link.
In the Personalize Region: Basic Details screen, click on the Create Item icon for the Default Single Column: Basic Details object as shown in the following screenshot:
From the Item Style list, select MessageStyledText to add a display only field.
Set the values of the following properties:
Property
Value
ID
XXOrigHireDate
Prompt
Orig. Hire Date
View Attribute
OriginalDateOfHire
View Instance
BasicDetailsCurrentVO
Click on the Apply button.
How it works...
We have now added the item, but note that we need to move the item just next to the Full Name field and also the font for the item's data is not the same as the other data. We are going to reorder the item in the region in the next recipe.