Sunday, August 2, 2009

ADF: Text resource issue

Status: Resolved
JDeveloper: 11.1.1.1.0
WebLogic: 10.3.1

Last week I came accross a cool blog about ADF BUGS FACTS. The author inspired me to write myself about similiar experiences with ADF11/JDeveloper. So today I will describe a bug concerning the i18n capabilities in ADF11.

First I have to mention tha the support for i18n text resources improved very well with JDev11 but there is a case when things do not work correctly. So in the case your ViewController project name contains a dash. things do not work anymore as expected. So in our company we have following convention to name our applications/projects.

customer-app
      app-model
      app-webui

With that convention your not able to work with the “select text resource” feature on ADF Faces Pages, because invalid code is generated. So here is the example

jdev11_i18n_bug-1024x640Because the ViewController project is called myapp-ui you get the following buggy code

jdev11_i18n_bug2

Solution

Solution is to remove the dash in c:set and of course all EL references.

<c:set var="myappuiBundle"
     value="#{adfBundle['de.team.training.i18n.myapp-uiBundle']}"/>

and

<af:outputText value="#{myappuiBundle.MY_APPLICATION_TITLE}" id="ot1"/>

After this fix the text resource is resolved correctly

jdev11_i18n_bug3


Things learned

Don’t: use dashes (-) in project names! This may cause trouble in development of fusion web applications.

Related posts

Page Fragment Design view is messed up when using resource bundle

Comment from Milkbird: Thanks for your reference Andreas. I think this is realy usefull, since someone could loose a lot of time to find out what is wrong and how to fix it.