Showing posts from April, 2011

ADF 11g Quickies - A new series of posts

As an ADF consultant I get lots and lots of questions on ADF (duh..). I usually answer these using a simple sample and some explanations. These effort are hardly ever documented by me. I decided to use this Blog to write all these tiny things down for future 'ADF generations'.

From now on this Blog will host ADF 11g Quickies.

ADF 11g Quicky : Select text from a resourcebundle

One of the questions I got lately is how to select a specific text from a resource bundle and use it in an ADF Application. This is easy and can be done as shown below.

All you need is a resourcebundle containing the keys and text values, a selectcomponent to set the actual key and some java code in a valueChangeListener to search the resourcebundle for the key. So first create the resourceBundle file to hold the key/value pairs for the text resources.

Next implement the page holding the selectcomponent, and an output component to show the value retrieved from the resourcebundle.
1: <af:panelGroupLayout id="pgl1">
2: <af:selectOneChoice valueChangeListener="#{pageFlowScope.resourceBundleManager.listEntryChanged}"
3: id="soc1" autoSubmit="true" valuePassThru="true"
4: label="#{viewcontrollerBundle.SEL_RESOURCE_KEY}">
5: <af:selectItem label="Value 1" value…