Sunday, August 16, 2020
LOV Events in OAF
LOV Events in OAF
There are some scenarios where we need to take some action on the basis of LOV, LOV fires three events:
1) lovUpdate : when user selects a value from lov.
2) lovValidate: when user enters a valid value in the lov input and tabs out then lov doesn't get pop-up.
In this case lovValidate event is fired.
3) lovPrepare: when user clicks on torch icon: "lovPrepare" event is fired.
//If we want to check which LOV has fired the event we can check it like this:
{codecitation class="brush: java; gutter: true;" width="600px"}
if (pageContext.isLovEvent())
{
String lovInputSourceId = pageContext.getLovInputSourceId();
if ("myLovInput".equals(lovInputSourceId))
{
am.invokeMethod("handleMyLovInputEvent");
}
}
//
//Here is another sample code based on multiple LOV's
{codecitation class="brush: java; gutter: true;" width="600px"}
if (pageContext.isLovEvent())
{
if ("Project".equals(lovInputSourceId))
{
am.invokeMethod("clearChargeCode");
}
if ("ChargeAccount".equals(lovInputSourceId))
{
am.invokeMethod("clearTask");
}
if ("Shipto".equals(lovInputSourceId))
{
am.invokeMethod("clearAddress");
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment