MenuModelBuilder builder = pageContext.getMenuBuilder();
try {
// End the existing menu item
builder.endMenuItem();
} catch (BuilderException be) {
logger.error("menu-building-error", be);
throw new PAPIException(
exceptionLocalizer.format("menu-building-error"), be);
}