code: private String getMenuType(final WSubMenu submenu) {
  		WMenu menu = WebUtilities.getAncestorOfClass(WMenu.class, submenu);
  		switch (menu.getType()) {
  			case BAR:
  				return "bar";
  			case FLYOUT:
  				return "flyout";
  			case TREE:
  				return "tree";
  			case COLUMN:
  				return "column";
  			default:
  				throw new IllegalStateException("Invalid menu type: " + menu.getType());
  		}
  	}
docs: Get the string value of a WMenu.MenuType.
  @param submenu he WSubMenu currently being rendered
  @return the menu type as a string