Get value of LOV/choiceList programmaticaly in bean instead of index in Oracle ADF

Requirment-Get value of LOV/choiceList programmaticaly in bean instead of index in Oracle ADF

When you wrote like In backing bean we get the index, not the value. most of the developer did this mistake.

JSFUtils.resolveExpression(“#{bindings.EmployeeId.inputValue}”); —- We got the index

Instead of use attributeValue to get the value in bean.use this code in the bean or as the EL

JSFUtils.resolveExpression(“#{bindings.EmployeeId.attributeValue}”);

Setting the value in Different scope in ADF in programmatic way

Sometime in ADF application we want to set the value in different scope programmatic .How to do that.
Use below code to do that.You can create a variable in any scope and put value in it

 
  ADFContext adfCtx = ADFContext.getCurrent();
       Map appScope = adfCtx.getApplicationScope();
       appScope.put("vinay", "true");

Similarly you can get the value of any variable stored in any variable

 
  ADFContext adfCtx = ADFContext.getCurrent();
       Map appScope = adfCtx.getApplicationScope();
    String appScopeValue=  (String)appScope.get("vinay");

getting Attribute value from View Object column in ADF

Hi All,

When ever we want to have value of some attribute we can use below code .It work fine in managed and backing bean .
Create a java class and import

 
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;

import oracle.adf.model.binding.DCIteratorBinding;

and using below code get value of any attribute

 
        BindingContext ctx = BindingContext.getCurrent();
        DCBindingContainer bc = (DCBindingContainer)ctx.getCurrentBindingsEntry();
        DCIteratorBinding iterator = bc.findIteratorBinding("ViewObjectIterator");
        Row r = iterator.getCurrentRow();
        String empNameValue = (String)r.getAttribute("EmpName");