pageContext.popElement(this);
MenuModelBuilder builder = pageContext.getMenuBuilder();
try {
Menu menu = builder.endMenu();
// If a menu is completed (i.e. this is not nested) then need to
// process it and output against specific renderer and markup.
if (menu != null) {
// Obtain a suitable renderer
MenuRendererSelectorLocator rendererLocator =
pageContext.getRendererLocator();
MenuRendererSelector rendererSelector =
rendererLocator.getMenuRendererSelector(pageContext);
if (rendererSelector == null) {
logger.error("selector-rendering-error", "menu");
throw new PAPIException(exceptionLocalizer.format(
"missing-renderer-selector", "menu"));
}
MenuRenderer renderer =
rendererSelector.selectMenuRenderer(menu);
final ShortcutProperties shortcutProperties =
menu.getShortcutProperties();
if (null != shortcutProperties) {
// If the device cannot support mixed content in the body
// of a link, then update the shortcut properties so that
// span elements will not be used.
String supportsMixedContent = pageContext.