public static Menu getMenuByStartWith(String menuId) { if (menuId.startsWith("/")) menuId = menuId.substring(1); for (Menu each : Menu.values()) { if (each.isLeaf()) if (menuId.startsWith(each.id)) return each; } return null; }
static { connector.setChildren(Menu.values()); connector.orderSiblings(); }