Question

I am using ADF JDeveloper 11g Release 2

I am using Entity object called Project referring to actual database table. This table contains fileds that hold abbreviation values; for example this table have filed called STATUS that describe the current status for the project. this filed will have values like: 'A' for Approved, 'X' for Rejected, and so on.

In the interface( JSPX, or JSF Pages) I am just drag and drop the View object that refers to the Project Entity object. and the page will display the project records with their status as specified.

Question is:

Is there any way to change this observation values to the actual value somewhere; That is, Instead of having values like ( A, X,...) I want to have ( Approved, Rejected,...)

Was it helpful?

Solution

You can create a transient attribute at VO level. In the value of this attribute you can write groovy expression which will use the value of attribute named status and decode it.

Alternatively, you can alter the VO query using DECODE function by doing something like this :

SELECT name and other fields needed, DECODE(status, 'A', 'Approved', 'X', 'Rejected', 'P', 'Pending', 'Default') decodedstatus FROM projects;

You will need to have an additional attribute in VO in this case and can directly use the value returned by VO in UI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top