Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EAK-523] Improve the handling of multifields inside prefixed fieldsets #523

Closed
liubou-masiuk opened this issue May 23, 2024 · 0 comments
Closed
Labels
AEM AEM-specific competencies are involved

Comments

@liubou-masiuk
Copy link
Collaborator

liubou-masiuk commented May 23, 2024

Example code

@FieldSet(namePrefix = "node1_")
    private Fieldset fieldset;

    @FieldSet(namePrefix = "node2/")
    private Fieldset fieldset2;

    public static class Fieldset{
        @DialogField
        @TextField
        private String fieldsetTitle;

        @DialogField
        @MultiField(value = MultifieldItem.class)
        List<MultifieldItem> items;
    }
    
    public static class MultifieldItem {
        @DialogField
        @TextField
        private String title;
        @DialogField
        @TextField
        private String description;
    }

Actual result: Currently, the fieldset prefix is added to both the multifield node name and multifield field's name. In the example above the title field will be stored in
node1_items/item0/node1_title
node2/items/item0/node2/title
respectively. It is difficult to retrieve multifield items from such nodes afterwards because the miltifield injectors are not aware about field prefixes

Expected result: the prefix is added only to top-level fields:
node1_items/item0/title
node2/items/item0/title

@liubou-masiuk liubou-masiuk added the AEM AEM-specific competencies are involved label May 23, 2024
@liubou-masiuk liubou-masiuk added this to To do in Development tasks via automation May 23, 2024
Development tasks automation moved this from To do to Done May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AEM AEM-specific competencies are involved
Projects
Development

No branches or pull requests

2 participants