try {
// Create a menu model for the shard link attributes.
ShardLinkMenuModelBuilder builder =
new ShardLinkMenuModelBuilder(
getOutputBufferFactory());
ShardLinkMenu menu = builder.buildShardLinkMenuModel(attributes);
// Render the shard link menu.
MenuRenderer menuRenderer = getShardLinkMenuModule().
getMenuRendererSelector().selectMenuRenderer(menu);
menuRenderer.render(menu);