AbstractSmartField - parsing for an exact value [message #1851001] |
Thu, 24 March 2022 06:52  |
Eclipse User |
|
|
|
Hi there everyone,
I have some issues with the default behaviour of the AbstractSmartField. When one types a text into the field, it displays the closest matches to the typed text. This is fine and works very well allowing the user to make the best choice.
However, in my use case, when a row in a table needs editing, the data is displayed in a form. I have a smartfield on the form for Drivers licence categories https://www.gov.uk/driving-licence-categories
If the Person selected in the table has a driver's licence type of say "Category A", after filling the form (using the parseAndSetValue method for smartfields), the smartfield complains that there are
"multiple results for "Category A"". It looks like it parses for the closest results BUT not for an exact result.
Is there any way I can get it to parse for an exact result?
Cheers,
JD
|
|
|
|
|
|
|
|
|
Re: AbstractSmartField - parsing for an exact value [message #1851198 is a reply to message #1851117] |
Wed, 30 March 2022 07:55  |
Eclipse User |
|
|
|
Hi there Andre,
I finally decided to modify the SQL view query on the backend and instead of returning text labels of foreign keys in the Employee view, the query returns the actual integer foreign keys.
I then discovered that when these keys are passed to the Eclipse Scout smartfields, everything functions correctly! Methods like setValue(KEY) finds the correct text associated with the key because the keys are unique.
Thnaks a lot for your clarification. I really appreciate it.
Cheers,
JD
|
|
|
Powered by
FUDForum. Page generated in 0.30394 seconds