Saturday, August 3, 2013

Internationalization Of af:query

I found ADF af:query is very useful. It provide out of box search and reporting capability. Typically we define some search criteria in View Object, and we use that criteria as af:query component.
All the labels we see in the page can be internationalized by using resource bundle in normal way.
For some labels we can use the below properties of af:query
                              ·         headerText
                              ·         resetButtonText
                              ·         saveButtonText
                              ·         searchButtonText
“Advanced” and “Saved Search” automatically take care. In fact all these labels are automatically translated as per locale. Only to support the language for which translation is not available or you want to have your customize label you can use above properties.
And rest of the labels can be customized or internationalized by using resource bundle configured for application module. To do so we need to modify the attribute of view object, In Control Hints section, Label Text filed can be modified to point right message key from the bundle.


Saturday, July 6, 2013

ADF Tree Table javax.faces.model.NoRowAvailableException

Usually this issue appears with Tree Table, when we modify the model associated with the tree. The UI state (disclosure and section information) is captured corresponding UI component object. When the model is updated those state become invalid. And when the tree try to restore the old state with new set of data then there could be a situation where this NoRowAvailableException can occur.

To avoid this better to clear the selection when model is updated. And then immediately partial refresh the tree .

I had used something like this to clear.

 if (treeTable != null && treeTable .getDisclosedRowKeys()!=null ){
        treeTable .getDisclosedRowKeys().clear();
    }

JBO-26001: NoXMLFileException

This exception comes in ADF BC projects. In my case <project>.jpx file was not part of deployment.
Run time BC needs the .jpx, As it is not able to find it throw JBO-26001: NoXMLFileException exception.
To make sure .jpx is part of deployment. Right click on project under deployment section check whether its included or not. If its not included add it.
Hope it solve the issue.