When-Validate-Item trigger in ADF with PPR
By Shay Shmeltzer on Jan 28, 2009
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.