public MenuItemRenderedContent render(OutputBuffer buffer, MenuItem item)
throws RendererException {
try {
// Get the information from the menu item to output
SpanAttributes attributes = null;
final ElementDetails elementDetails =
item.getLabel().getText().getElementDetails();
// If the style information exists we will need to output a "span"
// around the text in order to apply style
if (elementDetails != null) {
// Set up the span attributes to be applied here and after the
// text output
attributes = new SpanAttributes();
attributes.setElementDetails(elementDetails);
spanOutput.openSpan((DOMOutputBuffer)buffer, attributes);
}
// Write the text for the menu item into the output buffer.