Ul menu = new Ul();
add( menu );
for ( Class<? extends Page> page : pages )
{
Li menuItem = new Li();
Anchor link = new Anchor( localize( "menu." + page.getSimpleName().toLowerCase() ), page );
menuItem.add( link );
if ( WebApplication.get().getPageClassByPath( RequestCycle.get().getRequest().getServletPath() ) == page )
{
link.setClassName( "selected" );
}