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!
Hello,
I have never done this in the model, but you could try to do the same but in the DBResourceBundle.java class call AM method getResourceBundle like this:
getResourceBundle(String locale){
String amDef = "your.fully.qualified.class.name.of.the.application.module"; String config = "the_configuration_name_to_use"; ApplicationModule am = Configuration.createRootApplicationModule(amDef, config); Map map = am.getResourceBundle(locale); Configuration.releaseApplicationModule(am, false);
return map;
}
Then, in your entity.xml you should have this reference:
<ResourceBundle>
<JavaResourceBundle MsgBundleClass="path.to.DBResourceBundle"/>
</ResourceBundle>
and in the attribute something like this:
<Attribute
Name="AttrName"
...>
<Properties>
<SchemaBasedProperties>
<LABEL ResId="LABEL_KEY_IN_DB"/>
</SchemaBasedProperties>
</Properties>
</Attribute>
regards,
Ruben
Hi Ruben,
Thanks for the code. Will give it a try.