Wednesday Jan 28, 2009

When-Validate-Item trigger in ADF with PPR

Here's a common thing that many Forms developers who move to ADF run into - you have a field that is a code and you want to display the translation of the code in the field next to it when the code is entered. In forms you use the when-validate-item trigger to do this usually.

Well in ADF one way to do it is to define a view object that is based on the Entity object of both the core and code tables. For example a VO that is based on Employees as the updateable EO and on Departments as a reference EO that is used to translate the deptId in the Employee table.
Once you did this - you want to add the ability in your JSF ADF page to populate the description field with the department name once someone fills out the departmentId.

Here is a quick demo of how you would do this - it's a very basic partial page rendering technique:

[update 2013 - there is an even simpler way to do PPR see here.]

If you are reading this blog there is a good chance that you might be interested to learn about the LOV feature of ADF - might make for a better UI. See these entries: cascading LOVs,LOVs for parameters, and part two of the above solution where you can type the description and get the code.

About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today