This example demonstrates how to group MenuItem instances. The Menu API also supports building a menu like this using existing markup.