Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Changing abbreviation values coming for Database in ADF view Object

Salman5Feb 10 2014 — edited Feb 10 2014

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,...)

This post has been answered by vinaykumar2 on Feb 10 2014
Jump to Answer

Comments

vinaykumar2
Answer

you can write in an el in the value of stauts field as "#{binding.status.inputValue=='A'?'Approved':'Rejected'}

Marked as Answer by Salman5 · Sep 27 2020
Antonis Antoniou

Hi,

Why don't you create another column that will hold the display values?

So your table is going to be like this:

     Column_A: A, X

     Column_B: Approved, Rejected

You can display on the UI Column_B while storing Column_A in the DB.

Even though what vinaykumar2 suggested will work i would personally avoid it as this requires hard-coding values on the UI.

Antonis

Salman5

Thank you vinaykumar2,

What if there is more options other than Approved and Rejected conditions, how can I specify that in the Expression Language. some thing like:

if 'A' then Approved

else if 'X' then Rejected

else if 'C' Canceled

else if 'R' then Reviewed

else if .....

my point is there is many conditions.

Salman5

I found the answer for nested condition in Expression Language in this thread:

vinaykumar2

good..

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 10 2014
Added on Feb 10 2014
5 comments
292 views