[MAGNOLIA-6324] Multifield sub-field requires extra name property when configured from YAML Created: 27/Jul/15 Updated: 13/Mar/17 Resolved: 08/Mar/17 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 5.4 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christoph Meier | Assignee: | Ngoc Nguyenthanh |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2.5h | ||
| Original Estimate: | 2.5h | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| 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)
|
||||||||
| Date of First Response: | |||||||||
| Sprint: | Saigon 86 | ||||||||
| Story Points: | 2 | ||||||||
| Description |
|
The name property is required for multifields' sub-field in YAML (e.g. categories/field@name below), which was not with JCR and which is not obvious.
name: categories
class: info.magnolia.ui.form.field.definition.MultiValueFieldDefinition
label: Categories
description: Add as many categories as desired.
buttonSelectAddLabel: Add
field:
name: linkfield
class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
appName: categories
targetWorkspace: category
buttonSelectNewLabel: Select
buttonSelectOtherLabel: Select
type: String
identifierToPathConverter:
class: info.magnolia.ui.form.field.converter.BaseIdentifierToPathConverter
When missing "name" on YAML, a key generator class throws a nullpointer ex. (if i remember correctly). |
| Comments |
| Comment by Ugo La Giorgia [ 18/Nov/15 ] |
|
I have to add that exporting a complex JCR dialog as YAML does not add the name attribute that is required so basically the exported YAML is by all means broken and has to be fixed manually. should set a higher priority |
| Comment by Mikaël Geljić [ 07/Mar/17 ] |
|
I can indeed imagine that key-generators need a field-name; 2 questions then:
Can you first verify that ngoc.nguyenthanh? Thanks! |
| Comment by Ngoc Nguyenthanh [ 08/Mar/17 ] |
|
I tested in 5.5.3-SNAPSHOT. Everything works as expected. {{Updated: Failed on 5.4.12-SNAPSHOT as described }} |
| Comment by Mikaël Geljić [ 08/Mar/17 ] |
|
Yep confirming. I was asking what field name we get in field captions (though they're not visible at the moment, but may be used as a base-name for other keys). With name ("linky"): {dialogId}.mainTab.categories.linky.label Map2bean seems to properly set definition name from map keys, just like n2b then. |
| Comment by Ngoc Nguyenthanh [ 10/Mar/17 ] |
|
5.5.3-SNAPSHOT works as expected because of Map2BeanTransformer refactoring in ticket |