Sunday, May 26, 2013

ADF: Static Values View Object does not show any values (solved)


Environment
ADF/JDEV 11.1.2.4

Problem description
After creating a ViewObject of Type "static values" and running an instance inside the Business Components tester I noticed that no values are displayed at runtime! From the navigation action it looks like there are exactly as many rows that has been created, but whatever row is displayed, all values are empty!


Analysis
Looking in depth I noticed that the reference to the resource bundle where the static values are coming from, is invalid. The path does not match the actual source for the properties file although the static values ViewObject has been created by the JDeveloper Wizard

Solution
Short term solution is to manually adjust the value of the attribute PropertiesFile of the corresponding ResourceBundle.

So if the Property file is under src/enpit/sample/adf/transientvoascriteria/modelBundle.properties set the value to PropertiesFile="enpit.sample.adf.transientvoascriteria.modelBundle"

Rebuild and restart the BC Tester to verify that everything is working as expected:


Remark
The reason for the mismatch I guess is because JDeveloper does not handle everything correctly if having dots in project names. So take care if you use JDeveloper project names like 'MyApp.Model'. Double check references to the property bundle!