src/main/java/org/efaps/ui/wicket/components/gridx/GridXComponent.java
protected CharSequence getMenu(final Set<DojoClass> _dojoClasses)
        throws EFapsException
    {
        final StringBuilder ret = new StringBuilder();
        final UIGrid uiGrid = (UIGrid) getDefaultModelObject();
        if (!(uiGrid instanceof UIFieldGrid) && uiGrid.getCommand().getTargetMenu() != null) {
            Collections.addAll(_dojoClasses, DojoClasses.MenuBar, DojoClasses.DropDownMenu, DojoClasses.MenuItem,
                            DojoClasses.PopupMenuBarItem, DojoClasses.MenuBarItem);

            ret.append("var pMenuBar = new MenuBar({});\n");
            for (final AbstractCommand child : uiGrid.getCommand().getTargetMenu().getCommands()) {
                if (child.hasAccess(uiGrid.getCommand().getTargetMode(), uiGrid.getInstance())) {
                    if (child instanceof AbstractMenu) {
                        ret.append(getSubMenu((AbstractMenu) child, "pMenuBar"));
                    } else {
                        ret.append("pMenuBar.addChild(").append(getMenuItem(child, true)).append(");\n");
                    }
                }
            }
        }
        return ret;
    }
protected CharSequence getMenu(final Set<DojoClass> _dojoClasses)
        throws EFapsException
    {
        final StringBuilder ret = new StringBuilder();
        final UIGrid uiGrid = (UIGrid) getDefaultModelObject();
        if (!(uiGrid instanceof UIFieldGrid) && uiGrid.getCommand().getTargetMenu() != null) {
            Collections.addAll(_dojoClasses, DojoClasses.MenuBar, DojoClasses.DropDownMenu, DojoClasses.MenuItem,
                            DojoClasses.PopupMenuBarItem, DojoClasses.MenuBarItem);

            ret.append("var pMenuBar = new MenuBar({});\n");
            for (final AbstractCommand child : uiGrid.getCommand().getTargetMenu().getCommands()) {
                if (child.hasAccess(uiGrid.getCommand().getTargetMode(), uiGrid.getInstance())) {
                    if (child instanceof AbstractMenu) {
                        ret.append(getSubMenu((AbstractMenu) child, "pMenuBar"));
                    } else {
                        ret.append("pMenuBar.addChild(").append(getMenuItem(child, true)).append(");\n");
                    }
                }
            }
        }
        return ret;
    }
Gets the menu.

@param _dojoClasses the dojo classes
@return the menu
@throws EFapsException on error