MenuFactory: support for submenus