* {@inheritDoc}
*/
@Override
public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
NodeAdapter adapter = new NodeAdapter(getModelObject());
Menu menu = new Menu();
menu.load(adapter.getMenuNode());
final Response response = getResponse();
response.write("<ul");
if (!Strings.isEmpty(adapter.getOuterUlCssClass())) {
response.write(" class=\"");
response.write(adapter.getOuterUlCssClass());
response.write("\"");
}
response.write(">");
List<ChildEntry> childEntryList = menu.getRoot().getChildren();
ChildEntry firstEntry = childEntryList.get(0);
ChildEntry lastEntry = childEntryList.get(childEntryList.size() - 1);
for (ChildEntry entry : childEntryList) {
renderEntry(entry, adapter, response, getSelectedItems(menu), firstEntry.equals(entry), lastEntry.equals(entry));
}