This content has been marked as final. Show 10 replies
try these steps:
What we have to do is this.
1. Create a formValue field in the form.
2. In the LOV create one more mapping, with Return Item as the ID for the formValue field Created.
3. Also for this mapping, set 'Use for Validation'=yes.
It works like a charm now and user cannot enter invalid values.
Thank you very much for the valuable information given. I have followed the below steps:
In my OAF Page I have headers section and lines section.
My headers section region is of type MESSAGE COMPONENT LAYOUT. In this region I have a field i.e., Field-1 whose type is message lov input. For this Field-1 I have attached an external lov i.e., Lov-1.
1/ In the headers region I have created a new item of type MESSAGE LAYOUT. Under this I have created a new item i.e., Item-1 whose type is FORM VALUE.
2/ In the Field-1, I have created a new lov mapping i.e., LovMap-2 and set its return item to Item-1.
3/ Also for this new LovMap-2 I have selected the value YES for the property USE FOR VALIDATION.
Now when user enters a wrong value which is not listed in the lov and when he tries to save the record it gives an error message saying it is not a valid value.
Perfectly working fine as per your guidance.
But my requirement is when user enters some invalid value in the Field-1 and when he tries to navigate out of the field an error message should be displayed. In other words I should not allow the user to select any invalid value. Can you please guide me how to acheive this requirement.
Iam new to OAF and finding difficulty to acheive this requirement. Kindly please help me.
Many thanks in advance.
Edited by: A4S on Oct 12, 2010 7:14 PM
Hi Arun,1 person found this helpful
I think as soon as the user enter some invalid value LOV window should popup automatically, which actually means user has entered a invalid value.
I hope this feature is working in LOV created by you.
Yes as soon as the user enters some invalid value, LOV window is getting popup automatically.
But my problem is as follows:
Let us say LOV has values A,B,C. User entered D which is a invalid value. As soon as he enters D, LOV Window is populated automatically. In the LOV Window user can click cancel button and he is able to navigate to the other field. But I want to prevent user from navigating to other field when he enters an invalid value.
Same like When-Validate-Trigger functionality in Oracle Forms. In Oracle Forms when we select the option YES for the property 'Validate From List', User cannot navigate to other field when he enters an invalid value.
Same functionality I want to implement in OAF. Can you please guide me.
Many thanks in advance.
Arun Reddy D.
For this you can go for implementing VVO functionality i.e Validation View Object.1 person found this helpful
Brief Steps you have to perform on LOV Event:
1. Create a VVO. Its nothing but a View Object with the same query as List of Values.
2. Now pass the return value to this ViewObject and execute its query.
3. If it return a row that means its a valid value else its a invalid value and throw exception.
Hi,1 person found this helpful
Anil's suggestion is fine... it should work right at the field level..
but normally, we check on form submit that if invalid value has been selected then donot let the page submit or navigate.
This you can achieved by using formvalues
1) create a formValue with View Attribute same as Critirea item value.
2) create a lovMap with lov region item as value returned on critirea item
and return item as formValue and set the required property to true.
this will display the standard Oracle error for invalid value as the user will try to submit the page.
Bingo !!! ;)1 person found this helpful
Already given this solution above.
:) :) :)
Thanks for your valuable suggestions.
Gaurav thanks to you as well.
I will try to implement the VVO functionality to meet my requirement.
Once again thank you very much.
Arun Reddy D.