Here in this article, we are going to learn about the implementation of Poplist or Picklist in OAF. Poplist is nothing but a drop-down list in any web development. Usually when the value set and lookup contains very less number of values, probably 10-15 values. Hence we choose for Poplist, else we go for LOVs. Here in our example, we are going to give a list of values as drop down list rather poplist to choose their gender, and to provide such options, a lookup has been created and which is as below.
Let’s see how it is implemented in OAF
- Create a Poplist VO (which is Read Only) as shown below:
Package: xxrd.oracle.apps.ap.poplist.server
Name: XXRDGenderVO
- Write the query to fetch the active values from Lookup.
Query:
SELECT lookup_code GENDER
, meaning GENDER_DESC
FROM fnd_lookup_values
WHERE lookup_type = ‘XXRD_GENDER_LK’
AND enabled_flag = ‘Y’
AND TRUNC(SYSDATE) BETWEEN TRUNC(NVL(START_DATE_ACTIVE, SYSDATE))
AND TRUNC(NVL(END_DATE_ACTIVE, SYSDATE+1))
- Click Next
- Click Next
- Click Next
- Click Next and the below screen will appear. Uncheck all checkboxes to create any Implementation class.
- Click Finish and see how VO looks:
- Now select the Page as shown below. Moreover select the messageComponentLayout, Right to choose messageChoice item
- Now set the following properties for the messageChoice item.
ID: Gender
Item Style: messageChoice
Picklist View Definition: xxrd.oracle.apps.ap.poplist.server.XXRDGenderVO
Picklist Display Attribute: GenderDesc
Picklist Value Attribute: Gender
View Instance: XXRDEmployeeVO1
View Attribute: Gender
Prompt: Sex
Apart from the above mentioned properties, other properties can also be set.
- Page will look like this and the foolowings are entered with Female for Sex. At the front end meaning of the lookup will be shown which is user can interpret but in the column, the lookup code will be saved.
- Here you go.
This is how Poplist is implemented and it’s very simple too. Hope this helps.