[MGNLUI-6266] JcrMultiFieldDefinition should place the nodes it creates in a container node Created: 03/Oct/20 Updated: 05/Oct/20 Resolved: 05/Oct/20 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs |
| Affects Version/s: | 6.2, 6.2.1, 6.2.2, 6.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Will Scheidegger | Assignee: | Unassigned |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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 |
|
The new JcrMultiFieldDefinition adds the nodes it creates directly to the parent node, named after the jcrMultiField with a number added, e.g. "product0", "product1" etc. This leads to such a structure: As you can imagine, a structure like this does not all you to loop over the products. In the Freemarker templates you can cheat your way around this by getting all children and looping over them, filtering out all that do not match a name pattern. However in the SPA you don't have the component object available so you cannot loop over any properties. |
| Comments |
| Comment by Mercedes Iruela [ 05/Oct/20 ] |
|
Hi Will, For this purpose we included itemProviders. In our documentation there is a section to see how match the old transformers with the new approach: Magnolia 6 UI port of 5 UI field transformer classes. Hope this helps. Regards, |