December 24, 2013

Localization with f: loadBundle

To implement localization in ADF applications, we create property files with the fields and their values in different languages. For example, I have below property file with some fields and their values in Danish language. I want to display these values in the jsf page to the user.
BODY               =Hoveddel
ITEM               =Varepost
SUBMIT           =Indsend
SUMMARY     =Oversigt
COPY            =Kopier

To use these property fields and to display on the jsf page, we were provided a tag called “loadBundle” whose syntax is as below.

<f:loadBundle basename="application" var="app"/>

Where “application” is the basename of the property file and “app” is the variable name to be used in the jsf page to invoke these fields of the property file. If you are using more property files for different language like French,English and Danish, then the property file names should be as follows.

And maken a child entry to the tag <application> for the used languages in the faces-config.xml as below


So, whenever the language is changed, the corresponding property file will be picked up to display the fields.
And to use the fields in the page, we use el expression syntax like #{app.BODY}
In the loadBundle tag, for the basename attribute, we can also pass the ResourceBundle class instead of property file name.

September 25, 2013

Upload batch or bulk data into Oracle Cloud database

To upload bulk data into oracle cloud database service, which is presented in a text or excel file, follow the below procedure.

1)      Login to the oracle cloud and launch the database service
2)      Under “SQL Workshop”, select “Data work shop” option
3)      In the “Data Load” panel, select the option from which type of file you want to load the data
4)      Data loading wizard will be started
5)      Follow the wizard carefully and give the necessary inputs and click on finish

July 15, 2013

Status Indicator in ADF

In ADF, sometimes it will take time to load or refresh a page. In such cases, if you want to display some icon to indicate the page is loading or refreshing, you can use the ADF component “Status Indicator” which is available in Common Components panel. As ADF components are ajax components, the status indicator automatically identifies the status of the action and animates accordingly. The icon of status indicator on a page typically looks like as below.