I am trying to use a Converter to convert my values from a Model (id) to a Presentation (name). Since I am binding my data to a TextField, my Presentation must be a String. However, I run into the problem where the Presentation values are not unique. Such as:
Id Name
John Smith
John Smith
Now I can no long go from Presentation → Model.
Has anyone else run into this issue? Can I use CustomField<?> with a textfield to be able to convert from my Model to something other than String?
I still have not found a solution for this. Is anyone using a database to pull primary key id’s where the values associated with these primary keys are not unique? Does the converter not handle this situation?
This is especially troublesome in a Table where each cell is represented as a String.
Is convertToPresentation always called before convertToModel? If this is the case then I can assign a currentId at the beginning of convertToPresentation and then just return that value in convertToModel.