src/main/java/org/efaps/ui/wicket/components/menutree/MenuTree.java
public void setDefault(final UUID _selectCmdUUID)
    {
        final UIMenuItem menuItem = getProvider().getRoots().next();
        menuItem.setHeader(true);
        boolean hasDefault = false;
        for (final UIMenuItem childItem : menuItem.getChildren()) {
            if (_selectCmdUUID == null && childItem.isDefaultSelected()
                            || _selectCmdUUID != null && _selectCmdUUID.equals(childItem.getCommandUUID())) {
                hasDefault = true;
                childItem.setSelected(true);
            }
        }
        if (!hasDefault) {
            menuItem.setSelected(true);
        }
        expand(menuItem);
        expandChildren(menuItem);
    }
public void setDefault(final UUID _selectCmdUUID)
    {
        final UIMenuItem menuItem = getProvider().getRoots().next();
        menuItem.setHeader(true);
        boolean hasDefault = false;
        for (final UIMenuItem childItem : menuItem.getChildren()) {
            if (_selectCmdUUID == null && childItem.isDefaultSelected()
                            || _selectCmdUUID != null && _selectCmdUUID.equals(childItem.getCommandUUID())) {
                hasDefault = true;
                childItem.setSelected(true);
            }
        }
        if (!hasDefault) {
            menuItem.setSelected(true);
        }
        expand(menuItem);
        expandChildren(menuItem);
    }
public void setDefault ( final UUID _selectCmdUUID ) { final UIMenuItem menuItem = getProvider ( ) . getRoots ( ) . next ( ) ; menuItem . setHeader ( true ) ; boolean hasDefault = false ; for ( final UIMenuItem childItem : menuItem . getChildren ( ) ) { if ( _selectCmdUUID == null && childItem . isDefaultSelected ( ) || _selectCmdUUID != null && _selectCmdUUID . equals ( childItem . getCommandUUID ( ) ) ) { hasDefault = true ; childItem . setSelected ( true ) ; } } if ( ! hasDefault ) { menuItem . setSelected ( true ) ; } expand ( menuItem ) ; expandChildren ( menuItem ) ; }
Set the default selected item.

@param _selectCmdUUID UUID of the selected Command
Set the default selected item .