by patrick » Tue Mar 28, 2017 6:37 pm
Yes it is! When you navigate to a record that has a real value stored your user wants to see the display value for that! But obviously you don't have to load a whole list, but only need to resolve that one value. Maybe I'm not explaining that well. Let me try to explain the 3 cases again:
1. Nothing is in the field and the user has not typed anything yet (displayValue = null, realValue = null)
-> You want to return the whole list (at least as much as possible) and show that when the list drops down
2. Your user starts typing (displayValue != null)
-> only used for type aheads obviously, you want to return a filtered list
3. You have a real value in the field and the list you might have returned earlier doesn't return that
-> you want to make sure your user sees the display value for that real value
One example. You are in record A, user starts typing "A" and you return a list with everything beginning with A. User selects something from the list and Servoy internally holds that filtered list with all items starting with "A". Now you browse to the next record which has a real value that resolves to "B_something". He is not editing or anything, just looking at the record. The last value list you provided had everything beginning with "A", but we need to show "B_something" now. So you run into case 3.
I hope this makes it clearer?
Patrick Ruhsert
Servoy DACH