src/main/java/org/efaps/ui/wicket/components/menu/SlideIn.java
private CharSequence getMenuItem(final UIMenuItem _menuItem)
    {
        final StringBuilder js = new StringBuilder();

        final String node1 = RandomUtil.randomAlphabetic(4);
        final String node2 = RandomUtil.randomAlphabetic(4);

        js.append("var ").append(node1).append(" = domConstruct.create(\"div\", { class: \"menueentry\"}, sn);\n")
            .append("var ").append(node2).append(" = domConstruct.create(\"div\", { class: \"title");
        if (!_menuItem.getChildren().isEmpty()) {
            js.append(" closed");
        }
        js.append("\"},").append(node1).append(");\n")
            .append(getImage(_menuItem, node2))
            .append("domConstruct.create(\"span\", { class: \"menutitle\", innerHTML: \"")
            .append(StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(_menuItem.getLabel())))
            .append("\"} , ").append(node2).append("); \n")
            .append(getSubMenuItem(_menuItem, node1, node2));
        return js;
    }
private CharSequence getMenuItem(final UIMenuItem _menuItem)
    {
        final StringBuilder js = new StringBuilder();

        final String node1 = RandomUtil.randomAlphabetic(4);
        final String node2 = RandomUtil.randomAlphabetic(4);

        js.append("var ").append(node1).append(" = domConstruct.create(\"div\", { class: \"menueentry\"}, sn);\n")
            .append("var ").append(node2).append(" = domConstruct.create(\"div\", { class: \"title");
        if (!_menuItem.getChildren().isEmpty()) {
            js.append(" closed");
        }
        js.append("\"},").append(node1).append(");\n")
            .append(getImage(_menuItem, node2))
            .append("domConstruct.create(\"span\", { class: \"menutitle\", innerHTML: \"")
            .append(StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(_menuItem.getLabel())))
            .append("\"} , ").append(node2).append("); \n")
            .append(getSubMenuItem(_menuItem, node1, node2));
        return js;
    }
private CharSequence getMenuItem ( final UIMenuItem _menuItem ) { final StringBuilder js = new StringBuilder ( ) ; final String node1 = RandomUtil . randomAlphabetic ( 4 ) ; final String node2 = RandomUtil . randomAlphabetic ( 4 ) ; js . append ( "var " ) . append ( node1 ) . append ( " = domConstruct.create(\"div\", { class: \"menueentry\"}, sn);\n" ) . append ( "var " ) . append ( node2 ) . append ( " = domConstruct.create(\"div\", { class: \"title" ) ; if ( ! _menuItem . getChildren ( ) . isEmpty ( ) ) { js . append ( " closed" ) ; } js . append ( "\"}," ) . append ( node1 ) . append ( ");\n" ) . append ( getImage ( _menuItem , node2 ) ) . append ( "domConstruct.create(\"span\", { class: \"menutitle\", innerHTML: \"" ) . append ( StringEscapeUtils . escapeEcmaScript ( StringEscapeUtils . escapeHtml4 ( _menuItem . getLabel ( ) ) ) ) . append ( "\"} , " ) . append ( node2 ) . append ( "); \n" ) . append ( getSubMenuItem ( _menuItem , node1 , node2 ) ) ; return js ; }
Gets the menu item.

@param _menuItem the menu item
@return the menu item
Gets the menu item .