|
|
Re: FilterRowDataProvider - define custom display converter [message #1722965 is a reply to message #1722956] |
Wed, 10 February 2016 15:22 |
Juraj Lodnan Messages: 3 Registered: February 2016 |
Junior Member |
|
|
Yes, I have seen that example. Not helpful
In combo I have display values - Strings: Family, Sport, Luxury ... for EN language, for DE language are different labels etc.
Canonical values to display values: CFAM, CSPO, CLUX ... values of Enum called CarTypes
Stored value in a file via FilterRowDataProvider.saveState() is display value.
Loaded value is display value and has to be converted do canonical value - this is the problem - how to map "Family" translated string to corresponding "CFAM" enum value? Or "Familie" to "CFAM" for DE language.
+ I do not know that string value "Family" is related to Enum CarTypes
Solution would be not to store display value, but canonical value. To do this, custom display converter would be needed to be set in FilterRowDataProvider.
For persisting state I need different display converter than display converter registered to show values in ComboBox filter column.
In other words, problem is: Store canonical value instead of display value in a file. Reason: too complicated/impossible to do displayToCanonicalValue conversion.
Ideal state:
- define custom display converter in FilterRowDataProvider to save/load state, not default FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + columnIndex one
|
|
|
|
Powered by
FUDForum. Page generated in 0.03253 seconds