[MGNLUI-6740] Combobox with custom datasource will not show selected value Created: 09/Jun/21 Updated: 23/Jun/21 Resolved: 23/Jun/21 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | forms |
| Affects Version/s: | 6.2.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Marty Glaubitz | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu |
||
| Attachments: |
|
| Template: | |
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
| Comments |
| Comment by Roman Kovařík [ 10/Jun/21 ] |
|
Hi martyglaubitz,
OptionToModelTypeConverter searches configured options to select persisted value. You would have to create the options/OptionListDefinition already in the constructor or implement a custom converter.
Hope that helps Roman |
| Comment by Marty Glaubitz [ 16/Jun/21 ] |
|
@Roman archaic solution, but works. Maybe you guys can elaborate on that in the documentation of https://docs.magnolia-cms.com/product-docs/6.2/Templating/Dialog-definition/Field-definition/List-of-fields/Combobox-field.html |
| Comment by Roman Kovařík [ 16/Jun/21 ] |
|
Hi, I'm glad that it works. If you are looking for a cleaner solution:
Roman |