I found one approach to get the display value of LOV in managed bean using ADFUtils.evaluateEl method.
Say if you have a value change listener for an lov, valueChangeEvent.getNewValue() gives the index of the value. To get the display value of the lov, use below logic :
public void onDeptNameChange(ValueChangeEvent valueChangeEvent) {
Object deptNameAttribute = ADFUtils.evaluateEL("#{bindings.deptName.items['"+valueChangeEvent.getNewValue().toString()+ "'].label}"); String deptNameStr = deptNameAttribute .toString(); // This should have the selected display value of lov. }
Say if you want to access the display value of LOV, in any other method, other than valueChange listener, then use below code :
Object deptNameAttribute = ADFUtils.evaluateEL("#{bindings.deptName.items['"+ADFUtils.getBoundAttributeValue("deptId")+"'].label}");
Here deptId is the code of this lov. Hope this is helpful.
Happy learning with Techartifact……