getOutputBufferFactory().createOutputBuffer();
pageContext.pushOutputBuffer(content);
try {
MenuModelBuilder builder = pageContext.getMenuBuilder();
String title = attributes.getTitle();
// Action the builder to construct the label in the menu model
builder.startLabel();
// Set the stylistic information in the model for this element.
MenuInternals.setElementDetails(builder, attributes,
pageContext.getStylingEngine().getStyles());
// The label has events, style and pane, so handle these
MenuInternals.setEvents(builder, attributes, pageContext);
// Set the pane attribute
MenuInternals.setPane(builder, attributes.getPane(), pageContext);
// Handle the title
if (title != null) {
builder.setTitle(title);
}
// Set up the text
builder.startText();
builder.setText(content);
builder.endText();
// Complete the label
builder.endLabel();
} catch (BuilderException e) {
throw new PAPIException(e);
}
return PROCESS_ELEMENT_BODY;