src/main/java/org/efaps/ui/wicket/components/gridx/GridXComponent.java
protected CharSequence getPrintMenuItems(final Set<DojoClass> _dojoClasses)
    {
        final StringBuilder ret = new StringBuilder();
        Collections.addAll(_dojoClasses, DojoClasses.MenuItem);
        final PrintBehavior printBehavior = (PrintBehavior) getBehavior(PrintBehavior.class);
        final String[] mimes = new String[] {"PDF", "XLS"};
        for (final String mime : mimes) {
            if (ret.length() > 0) {
                ret.append(",");
            }
            ret.append("new MenuItem({\n")
                .append("label: \"").append(mime).append("\",\n")
                .append("iconClass:\"eFapsMenuIcon eFapsMenuIcon").append(mime.toUpperCase()).append("\",\n")
                .append("onClick: function(event) {\n")
                    .append("var g = registry.byId('grid');\n")
                    .append("var sr = g.select.row.getSelected();\n")
                    .append("if (sr.length == 0) {\n")
                    .append("array.forEach(g.rows(), function (_item, _id) {\n")
                    .append("sr[_id] = _item.id;\n")
                    .append("});\n")
                    .append("}\n")
                    .append("var cm = [];\n")
                    .append("array.forEach(g.columns(), function (_item, _id) {\n")
                    .append("cm[_id] = _item.id;\n")
                    .append("});\n")
                    .append(printBehavior.getCallbackFunctionBody(
                            CallbackParameter.resolved("MIME", "\"" + mime + "\""), CallbackParameter.explicit("sr"),
                            CallbackParameter.explicit("cm")))
                    .append("}\n")
                .append("})\n");
        }
        return ret;
    }
protected CharSequence getPrintMenuItems(final Set<DojoClass> _dojoClasses)
    {
        final StringBuilder ret = new StringBuilder();
        Collections.addAll(_dojoClasses, DojoClasses.MenuItem);
        final PrintBehavior printBehavior = (PrintBehavior) getBehavior(PrintBehavior.class);
        final String[] mimes = new String[] {"PDF", "XLS"};
        for (final String mime : mimes) {
            if (ret.length() > 0) {
                ret.append(",");
            }
            ret.append("new MenuItem({\n")
                .append("label: \"").append(mime).append("\",\n")
                .append("iconClass:\"eFapsMenuIcon eFapsMenuIcon").append(mime.toUpperCase()).append("\",\n")
                .append("onClick: function(event) {\n")
                    .append("var g = registry.byId('grid');\n")
                    .append("var sr = g.select.row.getSelected();\n")
                    .append("if (sr.length == 0) {\n")
                    .append("array.forEach(g.rows(), function (_item, _id) {\n")
                    .append("sr[_id] = _item.id;\n")
                    .append("});\n")
                    .append("}\n")
                    .append("var cm = [];\n")
                    .append("array.forEach(g.columns(), function (_item, _id) {\n")
                    .append("cm[_id] = _item.id;\n")
                    .append("});\n")
                    .append(printBehavior.getCallbackFunctionBody(
                            CallbackParameter.resolved("MIME", "\"" + mime + "\""), CallbackParameter.explicit("sr"),
                            CallbackParameter.explicit("cm")))
                    .append("}\n")
                .append("})\n");
        }
        return ret;
    }
Gets the prints the menu items.

@param _dojoClasses the dojo classes
@return the prints the menu items