protected boolean decodeDynamicMenuItem(FacesContext context, UIComponent component) {
        String clientId = component.getClientId(context);
        Map<String, String> params = context.getExternalContext().getRequestParameterMap();

        String menuid = params.get(clientId + "_menuid");
        if (menuid == null) {
            return false;
        }

        // split the UUID|COORDINATES by |
        String[] ids = menuid.split(Pattern.quote(BaseMenuModel.COORDINATES_SEPARATOR));
        if (ids.length == 0) {
            return false;
        }
        String uuid = ids[0];
        String coordinates = ids.length == 2 ? ids[1] : null;

        MenuItem menuitem = findMenuItemById(((MenuItemAware) component).getElements(), uuid);
        if (menuitem == null && coordinates != null) {
            // #8867 fallback to old PF logic for RequestScoped
            menuitem = findMenuItemByCoordinates(((MenuItemAware) component).getElements(), coordinates);
        }

        // skip removed/disabled menu items
        if (menuitem != null && !menuitem.isDisabled()) {
            MenuActionEvent event = new MenuActionEvent(component, menuitem);

            if (menuitem.isImmediate()) {
                event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
            }
            else {
                event.setPhaseId(PhaseId.INVOKE_APPLICATION);
            }

            component.queueEvent(event);
        }

        return true;
    }
Decode menu item not present in Faces tree but added using model attribute.
ID is in format UUID|COORDS.

@param context the FacesContext
@param component the menu component
@return true if a menu item has been decoded, otherwise false
primefaces/src/main/java/org/primefaces/renderkit/MenuItemAwareRenderer.java