Issue Bug Closed

#87179ActionMenuItemGroupViewHelper can not have f:for as child

Kevin Ditscheid 12/17/18, 09:35 updated 04/01/20, 21:14

Description

I tried to procedurally generate items inside the ActionMenuItemGroupViewHelper by using something like this:

<f:be.menus.actionMenu>
    <f:for each="{extensions}" as="template" key="extensionKey">
        <f:be.menus.actionMenuItemGroup label="{extensionKey}">
            <f:for each="{template}" as="currentTemplate" key="templateKey">
                <f:be.menus.actionMenuItem
                    controller="MyController"
                    action="Index"
                    arguments="{selectedTemplate: currentTemplate, selectedExtension: extensionKey}"
                    label="{templateKey}" />
            </f:for>
        </f:be.menus.actionMenuItemGroup>
    </f:for>
</f:be.menus.actionMenu>

The ActionMenuItemGroupViewHelper is checking the class name of its child nodes and refuses to render the for-loop, because it is the child node and not of the ActionMenuItemViewHelper class.
I think it is totally viable to have this kind of structure to generate an actionMenu with option groups, though.

Reviews 2

History 24

  1. Gerrit Code Review pushed patch set 1 for master to change 63927 status New Under Review 03/26/20, 09:42

  2. Gerrit Code Review pushed patch set 1 for 9.5 to change 63901 03/26/20, 16:40

  3. Susanne Moog commented and changed status Under Review Resolved done 0 % 100 % 03/26/20, 17:00

    Applied in changeset commit:17ab8082af9c233c1ca16f3c993fa2b9e4eb6440.

  4. Benni Mack changed status Resolved Closed 04/01/20, 21:14