Wednesday 11 July 2018

How to get lov values in oaf

How to get lov values in oaf

In this post , I will share the OAF code to get the LOV value in the OAF Page. We will put this code under the OAF Page controller , which will get the lov value from oaf page entered by the user. To get the lov value , first we need to capture the Lov event means we need to check is the LOV selected by the user in the OAF Page and once we got that event that user selected the Lov in the oaf page then we will write the code to get the lov value in the OAF Page.
 
We will write this code under the controller in the Process Form Request Method.
 

How to get lov values in oaf

 
if (pageContext.isLovEvent())
{
String lovid = pageContext.getLovInputSourceId();
if(“lov_name”.equals(lovid))
{
 
OAMessageLovInputBean lovBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive(lovid);

if(lovBean != null)
{
String lovvalue = (String) lovBean.getValue(pageContext);
System.out.println(“lov value entered by user "lovvalue);
}
}
 
How to get lov values in oaf
 

1 comments:

Anonymous said...

Hi

I have an lov inside an advanced table.
Once the user enters some values in lov, am iterating the rows inside the advanced table and checking for duplicates if any.
If there are duplicates, I am trying to clear the lov field but its not happening.

tried with below
row1.setAttribute("PreferenceValue", null);

as well as this
row1.setAttribute("PreferenceValue", "");

but its not reflecting in the UI.

The lov field in that particular row still contains the entered value

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *