LOV : List of Values.
There are many a times we use this bean in our page.
let us consider how to know whether an LOV event is raised...
Using isLovEvent() we can determine whether a lov event is fired or not.
But that is not enough :
Consider the following example
I have an LOV an Poplist...
Deppt : LOV
Emp : PopList..
Based on the value selected in LOV..
The poplist is fired..
But if i just give an invalid value in LOV( -10 the lov query doest not have dept no :10)
So the LOV event is fired and Poplist is fired..
if(isLovEvent)
{
invokeMethod(populate PopList);
}
My requirement is to fire the poplist if there is a valid value selected from LOV..
This requirement can be handled in the following
Have a form value for fvDept :
create another lovmap : for the dept LOV and for that lovmap return item to fvDept.
Now the solution is :
if user enters a value and LOV event is fired... fvDept will have valid value if and only if the value is part of LOV list..
So now use the following condition :
if(isLovEvent)
{
String fvDeptValue = pc.parameter("fvDept");
if(fvDeptValue!=null && !"".equals(fvDeptValue))
{
invokeMethod(populate PopList);
}
}
No comments:
Post a Comment