code: public void setSelectedMenuItem(final MenuItemSelectable selectedItem) {
  		MenuModel model = getOrCreateComponentModel();
  		if (selectedItem == null) {
  			model.selectedMenuItems = null;
  		} else if (selectedItem.isSelectAllowed()) {
  			if (model.selectedMenuItems == null) {
  				model.selectedMenuItems = new ArrayList<>();
  			} else {
  				model.selectedMenuItems.clear();
  			}
  			model.selectedMenuItems.add(selectedItem);
  		}
  	}
docs: Sets the selected item (WMenuItem and/or WSubMenu, depending on the menu type).
  
  @param selectedItem the selected item.