Sunday, March 2, 2014

ADF Mobile - Reading custom properties from adf-config.xml

Take a scenario where you have integrated the push notification feature into mobile application and application needs to be shipped to client, to work push notification feature you need Sender ID for both Android and iOS and client want's to use their own Sender Id.

Next question will be where can we store the custom Sender Id in the application so that the client can edit. Credit goes to Srini Indla(Oracle), I have extracted the idea based on one of his forum reply and below is one of the way.

Custom values can be stored in add-config.xml file under <adf:adf-properties-child> tag, add-config.xml is used to configure application-level settings, including the Configuration Service parameters and read more on ADF Mobile Configuration Service Usage. The advantage of storing the properties and accessing it via the adf-confg.xml is that the values can be accessible using the EL expression at run time.

Below is a sample adf-confif.xml with custom properties:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<adf-config xmlns="" xmlns:config=""
  <adf-adfm-config xmlns="">
    <defaults changeEventPolicy="ppr" useBindVarsForViewCriteriaLiterals="true"/>
        <config:Database jbo.locking.mode="optimistic"/>
  <adf:adf-properties-child xmlns="">
    <adf-property name="adfAppUID" value="MobileAdfConfig-1564"/>
    <adf-property name="username" value="Weblogic"/>
    <adf-property name="password" value="Weblogic1"/>
In Amx page you can access the above custom defined properties using EL expression.
For ex:  "#{applicationScope.configuration.username}"

Below is the sample code to access custom properties from adf-config.xml in managed bean.
ValueExpression userNameVe =
            AdfmfJavaUtilities.getValueExpression("#{applicationScope.configuration.username}", String.class);
String userName = (String)userNameVe.getValue(AdfmfJavaUtilities.getAdfELContext());

ValueExpression passwordVe =
            AdfmfJavaUtilities.getValueExpression("#{applicationScope.configuration.password}", String.class);
String password = (String)passwordVe.getValue(AdfmfJavaUtilities.getAdfELContext());


  1. Could you set the property on the fly as well?. For instance, from a value returned from a REST service?

  2. There is a great blog about Oracle ADF and thanks for sharing about Oracle ADF information. We are providing online training classes OracleADFonlinetraining

  3. Avail the best assistance for QuickBooks on Quickbooks Phone Number1 877-948-5867.

  4. Small business owners benefit from the accounting software as it helps business owners to track all the processes of accounting. QuickBooks is one of the best accounting software Quickbooks Phone Number.

  5. Obtain pocket-friendly technical support service for QuickBooks at Quickbooks Phone Number 1833-244-5865

  6. Let us take the pleasure to serve you, trust our team at Quickbooks Phone Number 1 855-377-7767 will surely help you get out of every technical glitch you are facing or going to face in the future.
    Quickbooks Phone Number

  7. Avail curbing solutions for QuickBooks at quickbooks phone number Quickbooks Phone Number 1 316-600-2287

  8. Really so amazing picture thanks for sharing .if you have anu problem with quickbooks software then please contact at

    QuickBooks Customer Service

  9. QuickBooks is a user-friendly accounting software which helps you to manage and run your accounts smoothly with more impact to your business. But, there are rare times when our customers struggle with persistent bugs & errors, namely QuickBooks Error 15215.
    quickbooks customer service (866)-822-4745

  10. QuickBooks Error 15215 is usually triggered by a conflict with another application running in the background when you attempt to download and install a payroll update.
    quickboks customer service(855) 742-7868.

  11. There are many ways to resolve QuickBooks Error 15215 and get your affairs back running on our software like - rebooting the system or running QuickBooks as a Windows Administrator. However, you can contact our team at
    Quickbooks Phone Number (877) 762-1118

  12. QuickBooks is financial accounting software may occur these errors while using it just call at ours team at

    quickbooks customer service

  13. Qb error PS077 happens due to downloading payroll application,But no issue we have a blog that will help you to fix the issue of QuickBooks error PS077 . You can call on 855-738-0359