You can download developed sample application - CalculatedValue.zip. This sample is based on standard HR schema available in Oracle XE database.
Calculated attribute can be added to View object in two steps:
1. Define new object attribute on View object, just provide name and type:
New attribute will be created as Transient:
2. Generate View Row Class for View object, just by selecting check-box in View Object Editor:
In generated class, edit getSalaryDiff() method and put needed logic here:
When described two steps are done, in Data Control calculated value becomes available and you can use it in your application User Interface layer:
Implemented sample application provides table with calculated value included - difference between maximal and minimum salaries:
When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.
0 comments:
Post a Comment